1 / 17

Saboteur

Board Representation. Saboteur. Permanent Brain. Features. Training. The engine that may or may not have beaten your engine. Jamie Morton. Hung Nguyen. Board Representation. Per-side representation Combined representation: standard of modern chess engines (e.g. Stockfish ).

simone
Download Presentation

Saboteur

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Board Representation Saboteur Permanent Brain Features Training The engine that may or may not have beaten your engine.. Jamie Morton Hung Nguyen

  2. Board Representation Per-side representation Combined representation: standard of modern chess engines(e.g. Stockfish)

  3. C/C++ Usage • Bit hacks at http://graphics.stanford.edu/~seander/bithacks.html • Assembly instructions can speed up bit manipulation instructions • Ambitious project to generate all board transpositions – failed because of 16GB memory limit • Initial usage JNI to interface Java with C/C++

  4. Communication • C++ threading is not used becauseVS 2010’s compiler is not C++11 compliant and Boost is not installed in BEN 002 • Java threading is used because java.util.concurrent.Future<V> has a cancel(bool) method

  5. Permanent Brain • Permanent brain, or ponder, is the ability for a chess engine to think out-of-turn • Java program communicates with the C++ process through standard streams • All the threading, time management, etc. is done in Java

  6. Permanent Brain (ctd.) • Once the Java getMove(GameState) method has found its move, it: • makes the move by changing the GameState • sorts the best 15 moves for the opponent • starts 15 threads from a reusable pool • each thread starts a C++ executable to find the best move for each of those board positions

  7. Permanent Brain (ctd.) • Once the opponent has made a move • If the move was already being considered, it is considered a ponder hit: • all other threads are cancelled • the main thread blocks until the ponder thread returns a move • Else, the main thread will: • cancel all threads • find its own best move

  8. Features • distance_to_goal • - • supported_piece • count_piece • - • threatened_piece

  9. More Features • charlie_piece • breakthrough_piece • max_column_dif • min_column_dif • reinforce_columns • reinforce_ground • indispensible_piece Offensive Defensive

  10. Evaluation Function • Features vector • WWeights vector • H Evaluation function + • How to choose the best weights? • Winning game > losing trivial piece

  11. Test Bed • Python interface • Hosts 2 game matches • Adjust player parameters • Determines winners Test Bed Tournament.jar Saboteur.jar Params1.txt Params2.txt

  12. Experimental Methods • Hilling Climbing • Adjust parameters at 0.1 increments • Pros: Easy to implement • Cons: • Many plateaus • Not precise • Gradient Descent • Adjust parameters via steepest slope • Pros: Guaranteed to converge • Cons: Hard to calculate • Evolutionary programming • Breed winning players

  13. Training Player Queue W Initial Player W )

  14. Training Player Queue Battle Zone

  15. Training W Player Queue Battle Zone

  16. Things to Consider • Draws? • Over 50% of all matches are draws • Parameter Convergence • Takes around 100 games to converge • Altogether over 30,000 games have been played • Converges to {1,0,0,0,…} More features?

  17. Questions? “These are not the questions you wanna ask,” Obi-wan.

More Related