ID_search is the function for MinMax algorithm.
MinMaxと言う関数がありますが使っていません。 メインの評価関数はSearchBestmoveです。
EvaluateBoardの評価は以下のように盤面上の石の位置に依存します。 (評価の値ですが調べると出てくるとは知らず自分でいじっていたらやけに極端な値が存在するようになりました...)
5000 | -500 | 20 | 20 | 20 | 20 | -500 | 5000 |
---|---|---|---|---|---|---|---|
-500 | -500 | 1 | 1 | 1 | 1 | -500 | -500 |
20 | 1 | 3 | 3 | 3 | 3 | 1 | 20 |
20 | 1 | 3 | 3 | 3 | 3 | 1 | 20 |
20 | 1 | 3 | 3 | 3 | 3 | 1 | 20 |
20 | 1 | 3 | 3 | 3 | 3 | 1 | 20 |
-500 | -500 | 1 | 1 | 1 | 1 | -500 | -500 |
5000 | -500 | 20 | 20 | 20 | 20 | -500 | 5000 |
- Fork a copy for your changes
- Clone it to your local workstation
- Create a new project to host your AI in https://console.cloud.google.com
- Run
gcloud init
and select that new project. gcloud app deploy python/
orgcloud app deploy go/
to deploy your app.- Add the appspot address to the "Reversi Players" sheet
- Modify the way a move is picked
- re-deploy the app
- repeat steps 7 and 8 until you have a very clever AI :)
- eventually push your awesome clever AI to github.
- If you want to keep it secret until Thursday night, that's fine.
- email step17 with your github repository link.
You can use this "reflector" program to make a locally running dev_appserver instance act like a human player (i.e. you don't have to deploy the whole app to have it run a game).
To run it:
- download and install Go if you don't have it already.
- Start a new game on https://step-reversi.appspot.com with a "Human (or Local bot)" selected as one of the players
- copy the URL of that browser tab showing that game (i.e. a URL that looks like "https://step-reversi.appspot.com/view?gamekey=fOoBaR")
- type
go run reflector.go "https://step-reversi.appspot.com/view?gamekey=fOoBaR"
- (but pasting your actual viewer URL there -- fOoBaR is not a real game ;)