4 ms·
I used a genetic algorithm to evolve the evaluation function that I used to win this programming contest: http://dinsights.com/POTM/LOAPS/finals.php http://din
by mightybyte 7y ago
I used a genetic algorithm to evolve the evaluation function that I used to win this programming contest:
http://dinsights.com/POTM/LOAPS/finals.php http://dinsights.com/POTM/LOAPS/finals.php
The game's scoring system was based on Lines of Action but added an alternative goal which was to win by points. So in order to play this game well a bot had to balance progress towards one of the goals with the need to make sure the opponent didn't get too far ahead in the other goal. My program was the output of a genetic algorithm that learned a remarkably good balance between these two sometimes competing goals. Before I used the genetic algorithm I spent a lot of time hand tuning the evaluation function and actually came up with a quite good result that I was unable to improve on. When I ran the genetic algorithm I was thrilled to discover that the genetic algorithm's output totally crushed my hand tuned output.
After my program won the contest with an undefeated 74-0-0 record the author of one of the best Lines of Action computer programs in the world played his program against mine. If the organizer of the programming contest had chosen just a slightly different scoring system that was biased a little more towards the Lines of Action goal, then my program would probably lose against the Lines of Action program. The author played two games of his program against my program. Both games ended with his program thinking it won by Lines of Action rules and my program thinking it won by the tweaked contest rules! This suggests that the organizer of the contest had done a particularly good job of balancing the different goals of the game. (No, this paragraph is about the organizer's game design and has nothing to do with the question of genetic algorithms. I just thought it was an interesting side note.)
I really have no idea of whether gradient descent optimization methods would have been better or not. But this was an area where genetic algorithms worked very well.