october 28th 2001gpw20011 using castle and assault maps for guiding opening and middle game play in...
TRANSCRIPT
![Page 1: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/1.jpg)
October 28th 2001 GPW2001 1
Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Sh
ogi
Reijer Grimbergen (Saga University)
Jeff Rollason (Oxford Softworks)
![Page 2: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/2.jpg)
October 28th 2001 GPW2001 2
An Opening Book for Shogi
In two-player complete information games an opening book is used to guide the program in the early stage of the game
The opening book of SPEAR: 1000+ professional games
More than 20 books on joseki
Problem: 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
![Page 3: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/3.jpg)
October 28th 2001 GPW2001 3
Using the Opening Book in Practice
Opening book test: 25 games against AI Shogi 2000, Kakinoki Shogi IV, Todai Shogi 2 and Kanazawa Shogi 98:
0
5
10
15
20
25
30
1 3 5 7 9 1113151719212325
Game Number
Mov
e N
umbe
r
AI Shogi
Kakinoki Shogi
KanazawaShogiTodai Shogi 2
![Page 4: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/4.jpg)
October 28th 2001 GPW2001 4
An Opening Book in Shogi: Results
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
![Page 5: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/5.jpg)
October 28th 2001 GPW2001 5
Implementation of Castle MapsShogi has a slow build-up
There are many different castles formations and ways to assault these castlesMost formations take a number of moves to buildFormations can have different stages
Idea: use board maps of castle formations and assault formations to guide opening and middle game play
![Page 6: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/6.jpg)
October 28th 2001 GPW2001 6
Data Structure for Board Maps
char **castles[] = {mino, a_mino, id_st
atic,
high_mino, a_mino, id_static,
silver_crown, a_mino, id_static,
boat, a_boat, id_ranging,
};
![Page 7: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/7.jpg)
October 28th 2001 GPW2001 7
Piece Definition Data Structurechar *mino[] = {
// Non-promoted pieces // Promoted piecesmino_pawn, mino_gold,mino_lance, mino_gold,mino_knight, mino_gold,mino_silver, mino_gold,mino_gold, void,mino_bishop, mino_bishop,mino_rook, mino_rook,mino_king, void,
“Mino”};
![Page 8: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/8.jpg)
October 28th 2001 GPW2001 8
Square Values for Each Piece char mino_king[] = { -9,-9,-9,-9,-9,-9,-9,-9,-9,
-9,-9,-9,-9,-9,-9,-9,-9,-9, -9,-9,-9,-9,-9,-9,-9,-9,-9, -9,-9,-9,-9,-9,-9,-9,-9,-9, -9,-9,-9,-9,-9,-9,-9,-9,-9, -9,-9,-9,-9,-8,-1,-1,-1,-1, -9,-9,-9,-9,-7, 0, 4, 8, 5, -9,-9,-9,-8,-6, 2, 8,14, 6, -9,-9,-9,-7,-5,-1, 8, 8, 6
} ;
![Page 9: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/9.jpg)
October 28th 2001 GPW2001 9
Strategic Guidance using Piece MapsHill climbing approach: try to move pieces to squares with a higher valueExample: if the king is on 5i in the current position, the following move sequences are suggested
[K5i-K4h-K3h-K2h] or [K5i-K4h-K3i-K2h](both paths have values [–5, 2, 8, 14])
Assault mapsThe assault is defined by the opponent’s castleAssault maps are defined in the same way as the castle map in the example
Current implementation: 35 castle formations and 20 assault formations
![Page 10: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/10.jpg)
October 28th 2001 GPW2001 10
Using Piece Maps in a Shogi Program
Select a target castleSelect the corresponding assault mapUse of the piece maps:① The evaluation function② To guide the search to the right move order③ Guide the program to a position it can
understand④ Establishing the game stage⑤ Plausible move generation
![Page 11: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/11.jpg)
October 28th 2001 GPW2001 11
Results
Match Book Result
10 20 30 40 50
AllMaps
vs
NoMaps
38-12 30-20 27-23 25-25 25-25 145-105
76% 70% 54% 50% 50% 58%
CastleMaps
vs
NoMaps
36-14 31-19 25-25 25-25 23-27 140-110
72% 62% 50% 50% 46% 56%
AllMaps
vs
CastleMaps
27-23 29-21 29-21 29-21 28-22 142-108
54% 58% 58% 58% 56% 57%
![Page 12: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/12.jpg)
October 28th 2001 GPW2001 12
Related Work
The otoshiana method (Yamashita 1998) also uses a hill climbing approach for building castles
Only 9 different castle formations
No assault formations
How to assess the opponent position?
![Page 13: October 28th 2001GPW20011 Using Castle and Assault Maps for Guiding Opening and Middle Game Play in Shogi Reijer Grimbergen (Saga University) Jeff Rollason](https://reader036.vdocuments.us/reader036/viewer/2022071806/56649cf85503460f949c816b/html5/thumbnails/13.jpg)
October 28th 2001 GPW2001 13
Conclusions and Future Work
The use of piece maps significantly improves the playing strength of a shogi program in the early stages of the gameFuture work
Multiple castles during the searchSwapping rules based on positional featuresScaling of castlesAssaults separate from castle formations