Chess
Classes
agent.h File Reference

How the Agent finds its move. More...

#include <vector>
#include "chessboard.h"
Include dependency graph for agent.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Node
 The Node structure is what makes up the tree of game states/moves traversed within Agent. More...
 
class  Agent
 Class used to programmatically produce a Chess move. More...
 

Detailed Description

How the Agent finds its move.

The agent files are used to produce the best move for the black team. Finding the best move requires looking at how a move affects mobility, structuring of pieces, and whether or not you take or lose pieces. This is all calculated in the function evaluate(). This function is called on every move that the minimax algorithm (with alpha beta pruning) passes it. The minimax algorithm is used to allow the agent to search X moves ahead and figure out which produces the best possible outcome for itself, and the worst possible outcome for the other player. Each move/new gamestate is represented within a Node, and each Node hold a vector of other Nodes.