Best M(AI) group
$pip3 install -r requirements.txt
$python3 game.py {number_rows} {number_columns} {connect_number}
- Initialise Game object.
- Use functions, go wild.
- You need to create a loop, like in main.py because the game is turn based.
- is valid location
- get valid moves
- check for win
- get next open row
- drop piece
- next turn
- draw board (pygame)
- print board (terminal window)
- DFS & BFS
- Minimax with alpha beta pruning
- Q Learning
python q_learning.py {Training Mode} {Iterations}
i.e
python q_learning.py 1 5
To train
python q_learning.py 0 5
To play
To play, set Training Mode to either 1 or 0. 1 = Training Mode ON 0 = Training Mode OFF
Q-learning uses its own Minimax file, minimax_agent_for_q_learning.py. This is because the q-learning agent must be the first one to start (because of the way we codede it)