Currently, the generate_population() function is hardcoded for the graph coloring game. The concept behind this function is simple: Given a game, generate a population of n players with random unique strategies.
This seems possible to generalize. As of now, it is hardcoded to accept the number of vertices and colors for a specific graph, and generates random orderings from there.
Possible solution: Implement a RandomInitStrategy for each game. This RandomInitStrategy randomly generates a valid strategy for the game being played, based on the ruleset of the game, upon calling its constructor (initializing it).
Currently, the
generate_population()
function is hardcoded for the graph coloring game. The concept behind this function is simple: Given a game, generate a population ofn
players with random unique strategies.This seems possible to generalize. As of now, it is hardcoded to accept the number of vertices and colors for a specific graph, and generates random orderings from there.
Possible solution: Implement a
RandomInitStrategy
for each game. ThisRandomInitStrategy
randomly generates a valid strategy for the game being played, based on the ruleset of the game, upon calling its constructor (initializing it).Unsure whether this will work 100% of the time.