Basic simulation and evaluation


Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content
Previous: Full turn simulation

Random search

This is the brain of our pods. It makes our pods "think" and "come up" with trajectory plans for the near future. To make it work, we need to try a lot of different trajectories and evaluate the outcomes they provide to pick the trajectory with the best score. Trajectory is defined with a list of game moves for the next N turns. We can easily generate trajectories randomly and then simulate the game with them:

Solution sol = new Solution(); float score = sol->RandomizeAndEvaluate(pods);

then just run this line 10 000 times more and if score of a solution is more than the best found then save it

static public void Main(string[] args)
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content