Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlesaverill/gocaml
A Go engine for OCaml
https://github.com/charlesaverill/gocaml
Last synced: about 6 hours ago
JSON representation
A Go engine for OCaml
- Host: GitHub
- URL: https://github.com/charlesaverill/gocaml
- Owner: CharlesAverill
- License: mit
- Created: 2023-11-19T05:42:59.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2023-11-19T06:52:16.000Z (12 months ago)
- Last Synced: 2024-04-20T00:54:40.435Z (7 months ago)
- Language: OCaml
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocaml
`gocaml` is a lightweight [go](https://en.wikipedia.org/wiki/Go_(game)) engine
## Usage
Requires Dune
If you'd like to play a game:
```bash
make run
```If you'd like to use the API:
- `Gocaml.Board.board` - The data structure for representing board data
- `Gocaml.Game_logic.move` - The type used to submit moves to the engine
- `Gocaml.Game_logic.get_liberties board point` - Returns a list of liberties around the given point
- `Gocaml.Game_logic.assert_legality board move` - Determine if a move is illegal, and why
- `Gocaml.Game_logic.place board move` - Places a piece on the board, **does** check for legality and will remove captured pieces## Navigation
- [game_logic.ml](lib/game_logic.ml) - The main engine code
- [board.ml](lib/board.ml) - Game board definitions
- [main.ml](bin/main.ml) - Driver code## Credits
I depended on [wikibooks](https://en.wikibooks.org/wiki/Computer_Go) as my primary source of literature on Computer Go