Awesome
HaskellMind
A Haskell and Elm implementation of Mastermind
This game emulates a game of Mastermind with three different modes:
- Human solver: in this mode the computer creates a secret code and the user tries to solve it on the console. This is the defeault mode
- Hill Climbing: in this mode it is the user that thinks of a secret code and the computer uses a Heuristic Hill Climbing algorithm to solve it
- Web Server: This mode is the backend server for my Elm Fronend
Live Demo
http://haskellmind.herokuapp.com/
Usage
- Install Haskell Stack
- run
stack build && PORT=3000 stack exec mastermind [ARG]
where ARG can be one of: hill_climbing
-> for the hill climbing console modeserver_mode
-> for the hill climbing server mode. 1. For this mode you'll need to set the PORT environment variable.- Or if left blank it will default to the human solver mode
For front-end
- [Optional] update server_url in Main.elm to point to your local server
cd client && npm start