Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrielpalassi/othelloai
Othello/Reversi AIs written in C
https://github.com/gabrielpalassi/othelloai
ai c othello-game reversi-game
Last synced: 24 days ago
JSON representation
Othello/Reversi AIs written in C
- Host: GitHub
- URL: https://github.com/gabrielpalassi/othelloai
- Owner: gabrielpalassi
- License: gpl-3.0
- Created: 2022-03-16T02:45:31.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-19T03:54:18.000Z (5 months ago)
- Last Synced: 2024-07-19T12:08:14.114Z (5 months ago)
- Topics: ai, c, othello-game, reversi-game
- Language: C
- Homepage:
- Size: 79.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ♟️ OthelloAI
Othello/Reversi is a strategy board game for two players, played on an 8×8 board, the game begins with four disks placed in a square in the middle of the grid, two facing white-side-up, two dark-side-up, so that the same-coloured disks are on a diagonal.
The dark player moves first, followed by the white player, alternating between themselves, until there is no legal move available, or until the board is completely filled. The player with the most disks in the end wins the game.
## What's a legal move?
To be considered legal, a move must respect the following rules:
1. The disk must be placed onto a spot that was previously empty
2. When placing the disk, it must surround one or more of the opponet's disks, in line horizontally, vertically or diagonally. (To surround means to have in between two disks of the same colour one or more consecutve disks of the other colour)The result of a legal move is to change the colour of the other player's disks to the colour of your own (see example below). If an illegal move is performed the player will be punished with the defeat.
Example:
## The Project
This project was created as an university assignment, and is hereby published under the GPL 3.0 license so that its code is freely available for everyone. The game is 100% CLI-based and can be executed by compiling the code contained in any of the .c files of this repository. Each file represents a diferent AI, with diferent approaches to the game (read code comments for further information).