https://github.com/malintha-induwara/connect-four-game
A Connect Four game implemented in Java using the Monte Carlo algorithm for AI decision making.
https://github.com/malintha-induwara/connect-four-game
java java-fx monte-carlo-simulation oop
Last synced: 4 months ago
JSON representation
A Connect Four game implemented in Java using the Monte Carlo algorithm for AI decision making.
- Host: GitHub
- URL: https://github.com/malintha-induwara/connect-four-game
- Owner: malintha-induwara
- License: mit
- Created: 2023-09-27T15:11:25.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-16T19:48:36.000Z (6 months ago)
- Last Synced: 2025-06-13T08:02:47.573Z (4 months ago)
- Topics: java, java-fx, monte-carlo-simulation, oop
- Language: Java
- Homepage:
- Size: 130 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Connect Four with Monte Carlo Algorithm.
* Connect 4 game made using JavaFX and Monte Carlo Tree Search Algorithem As AI.
### Create Game

### Game Progression



### AI Implementation & LLM Testing
This project has also been used as a benchmark for testing the ability of large language models (LLMs) to implement Monte Carlo Tree Search (MCTS). Since GPT-3, all (free-tier) models from OpenAI have struggled to produce a working implementation of MCTS, including other models such as Claude 3.5 (Anthropic) and DeepSeek-R1 (DeepSeekAI). However, o3-Mini(Low) successfully implemented the algorithm, making it the first in this series of models to do so.
You can find the LLM produced code inside the folder **`src/main/java/lk/ijse/dep/service/llm`**.
The implementation inside the `AiPlayer` class is the original implementation and was developed entirely without any help from LLMs.
### How to use this repo
* Open the pom.xml via IntelliJ IDEA
* Make sure to the open it as a project, if prompt
* Reload the pom.xml file via Maven Tool Window
* Create a run configuration for Maven via Run > Edit Configuration
* Add javafx:run as the Run command
That's it.