Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Castle Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason (Oxford Softworks)

Similar presentations


Presentation on theme: "Using Castle Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason (Oxford Softworks)"— Presentation transcript:

1 Using Castle Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason (Oxford Softworks)

2 Introduction Shogi programs are strong but still have weaknesses in the early stage of the game In two-player complete information games an opening book is used to guide the program through this phase How about an opening book for shogi?

3 An Opening Book for Shogi The opening book of SPEAR: 1000+ professional games More than 20 books on joseki Problem with building an opening book for shogi: the number of expert players is relatively small, therefore The number of publicly available expert games is small The number of books on opening play is small More than 110,000 positions

4 Using the Opening Book in Practice We tested the effectiveness of our opening book in 25 games against AI Shogi 2000, Kakinoki Shogi IV, Todai Shogi 2 and Kanazawa Shogi 98:

5 Using an Opening Book in Shogi Our program gets out of book quickly: Within five moves in 32 games; within ten moves in 71 games Average: out of book after 8.5 moves Conclusion: an opening book is not very useful in shogi A different method is needed to guide a program through the strategic build-up Our idea: use castle maps to guide the opening and middle game play

6 Castle Maps In shogi there are many different castles that take a number of moves to build We have defined castle maps for a number of common castles: char **castles[] = { mino,id_static, high_mino,id_static, silver_crown, id_static, boat,id_ranging, };

7 Piece Definitions for a Castle char *mino[] = { // Non-promoted pieces//Promoted pieces mino_pawn,mino_gold, mino_lance,mino_gold, mino_knight,mino_gold, mino_silver,mino_gold, mino_gold,void,mino_bishop,mino_rook, mino_king,void, “Mino” };

8 Square Values for Each Piece char mino_king[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,-9,-8,-1,-1,-1,-1, 0, 0, 0,-9,-7, 0, 4, 8, 5, 0, 0, 0,-8,-6, 2, 8,14, 6, 0, 0, 0,-7,-5,-1, 8, 8, 6 } ;

9 Strategic Guidance using Castle Maps In our example, in the mino castle the king is positioned best on square 2h Suppose the king is on 5i in the current position Hill climbing approach: move the king to the adjacent square with the highest value: K5i-K4h-K3h-K2h or K5i-K4h-K3i-K2h (both paths have values –5, 2, 8, 14)

10 Using Castle Maps in a Shogi Program First, the castle maps are used to select a target castle When many different castles can still be built, this castle selection needs extra support: Extra shogi knowledge encoded in rules to check special cases The use of castle maps:  The evaluation function  To guide the search because move order is important  Guide the program to a position it can understand  Plausible move generation: castle moves should not be discarded

11 Results Main reason for the improved results of SPEAR in the CSA tournament Self-play experiment results: BookMaps-NoMaps% 1012-860% 2013-765% 3010-1050% 409-1145% 509-1145% Total53-4753%

12 Conclusions and Future Work The use of castle maps considerably improves the playing strength of a shogi program in the very early stage of the game Future work: Testing the use of castle maps against strong programs Add attack maps Develop a more transparent method to deal with special cases


Download ppt "Using Castle Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason (Oxford Softworks)"

Similar presentations


Ads by Google