SHARE
TWEET

Untitled

a guest Jul 17th, 2019 88 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /// @description create
  2. //generations
  3. step = 0;
  4. //stage in generation
  5. ministep = 0;
  6. //ammount of creatures in generation
  7. population_size = 2000;
  8. //max time per generation
  9. max_time = 10*room_speed;
  10. //max steps
  11. max_steps = 50;
  12. //wheter or not to draw the population
  13. draw_step = false;
  14. //starting variables
  15. x_start = room_width/2
  16. y_start = room_height/2
  17. //finish
  18. finishing_circle_x = room_width/2
  19. finishing_circle_y = 200;
  20. //vars that hold minimums
  21. minimum_index = -1
  22. minimum_steps = 1000000000000000000000;
  23. //tracks ammount of ai hit location
  24. amount_hit = 0
  25.  
  26. //Randomize(), need to add this to make things truly random
  27. randomize()
  28.  
  29. //arrays
  30. for(var h = 0; h< max_steps; h++) {
  31.     for(var i = 0; i< population_size; i++) {
  32.         //Swapped h and i round (probably a logic error)
  33.         //In my system I use the first parameter to store steps and
  34.         //second parameter to store index of "population"
  35.         ai_directions[h, i] = -1;
  36.     }
  37. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top