Before delving into the main algorithm, you should have certain data structures implemented. We need to define a structure for the game state, another for the game actions, and a class for defining an instance of the problem. They can coexist in the same file.
The following is an example of the data structure for defining a game state:
public struct GameState { // TODO // your state definition here }
The following is an example of the data structure for defining a game action:
public struct GameAction { // TODO // your action definition here }
Finally, we will build the data type for defining a problem instance:
- Create the file and class:
public class ReinforcementProblem { }
- Define a virtual function for retrieving ...