Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// @description create
- //generations
- step = 0;
- //stage in generation
- ministep = 0;
- //ammount of creatures in generation
- population_size = 2000;
- //max time per generation
- max_time = 10*room_speed;
- //max steps
- max_steps = 50;
- //wheter or not to draw the population
- draw_step = false;
- //starting variables
- x_start = room_width/2
- y_start = room_height/2
- //finish
- finishing_circle_x = room_width/2
- finishing_circle_y = 200;
- //vars that hold minimums
- minimum_index = -1
- minimum_steps = 1000000000000000000000;
- //tracks ammount of ai hit location
- amount_hit = 0
- //Randomize(), need to add this to make things truly random
- randomize()
- //arrays
- for(var h = 0; h< max_steps; h++) {
- for(var i = 0; i< population_size; i++) {
- //Swapped h and i round (probably a logic error)
- //In my system I use the first parameter to store steps and
- //second parameter to store index of "population"
- ai_directions[h, i] = -1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement