Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synfo/minimax-framework
Simple framework for making CLI text games that gives you minimax AI for 'free'
https://github.com/synfo/minimax-framework
Last synced: 2 days ago
JSON representation
Simple framework for making CLI text games that gives you minimax AI for 'free'
- Host: GitHub
- URL: https://github.com/synfo/minimax-framework
- Owner: sYnfo
- Created: 2015-10-25T13:27:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-25T22:55:22.000Z (about 9 years ago)
- Last Synced: 2023-05-19T00:30:42.046Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 137 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# minimax
Framework for two-player CLI games that gives you a simple minimax AI for
'free'.## Usage
To use the framework you have to create a class representing the game you want
to implement, that includes the following methods:### over
Returns True iff the game is over, False otherwise.
### available_moves
Returns an iterator with all the valid moves from the current game state.
### get_new_state
argument: move
Returns an instance of the game class with the game state modified according
to the move.### score
Returns a numerical representation of how the current player is doing. Used by
the minimax algorithm.### display (optional)
For example implementation of couple games see the ```games``` folder.
### variable: help_text
### variable: move_explanation
### variable: ply