In this machine learning project from kaggle, we are required to make an agent that plays the game of ConnectX using reinforcement learning. The agent takes in various parametres such as the size of the board, the mark assigned to the agent, the current configuration of the board and returns a number of the column that it thinks is the best move for the game. Each agent is then evaluated by playing with other agents and then assigned a skill level.
-
In the first agent I have implemented a simple minimax algorithm with a custom heuristic function and one step look-ahead. This Folder contains the agent as as a py file and a jupyter notebook with a detailed walkthrough of the intutions behind the making of the agent and the custom heuristic function.(The skill of the agent is 1069.7 at the time of writing ranking 54th on the leaderboard).
You can also visit "https://www.kaggle.com/sidagar/getting-1000-score-using-only-minimax" to view the explanation notebook over kaggle.
P.S.: I have uploaded the whole notebook in HTML format separately for reference. If you only want to see the notebook you can download and view the HTML version or visit the kaggle link to view it. If you however wish to run the code on your own, you can either: 1. Download the ipynb format of the notebook and run it on your computer. Before running please make sure to install all the relevant libraries. 2. Visit kaggle links provided and fork the pinned version of the notebook and then run the notebook.
My Kaggle username is "sidagar" without quotes.