https://github.com/ryo-manba/connect4
モンテカルロ法を用いた4目並べゲーム
https://github.com/ryo-manba/connect4
connect4 connect4-ai-game cpp
Last synced: over 1 year ago
JSON representation
モンテカルロ法を用いた4目並べゲーム
- Host: GitHub
- URL: https://github.com/ryo-manba/connect4
- Owner: ryo-manba
- License: mit
- Created: 2021-12-04T02:00:55.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-13T02:46:38.000Z (over 4 years ago)
- Last Synced: 2025-01-23T14:18:52.999Z (over 1 year ago)
- Topics: connect4, connect4-ai-game, cpp
- Language: C++
- Homepage:
- Size: 88.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 4目並べ
## Requirement
- gcc or Clang
- GNU Make
## Usage
```
git clone https://github.com/ryo-manba/connect4
cd connect4 && make
./connect4
```
## How to play?
1.モードを選択します。

2.行番号を選択しコマを配置していきます。

3.縦・横・斜めいずれかに、先に4コマ並べた方が優勝です。
## Features
CPUのアルゴリズムでは[モンテカルロ法](https://ja.wikipedia.org/wiki/%E3%83%A2%E3%83%B3%E3%83%86%E3%82%AB%E3%83%AB%E3%83%AD%E6%B3%95)を利用しています。
各行ごとのシミュレーション回数は、
- EASY : 25
- NORMAL : 100
- HARD : 500
となっています。

もっとも勝利数が多いものを選択します。
また`includes/Const.hpp`の
```
#define COL_LEN 6
#define ROW_LEN 7
```
を変更することで盤面のサイズを変更することも可能です。

## Author
[twitter](https://twitter.com/ryo_manba)
## Licence
All code is released under the [MIT](https://github.com/ryo-manba/dena-review/blob/main/LICENSE) license