Download presentation
Presentation is loading. Please wait.
Published byJulian Andrews Modified over 9 years ago
1
PYIWIT'021 Threat Analysis to Reduce the Effects of the Horizon Problem in Shogi Reijer Grimbergen Department of Information Science Saga University
2
PYIWIT'022 Presentation Outline Game programming Time limits and the horizon effect Pruning and extension techniques Threat analysis in two-player games Application to shogi Implementation issues Preliminary results Conclusions and future work
3
PYIWIT'023 Game Programming Definitions Two-player perfect information games Only two players involved Game state is fully accessible to both players Goal: win the game against all the possible replies of the opponent
4
PYIWIT'024 Game Programming Search vs. knowledge Two basic approaches for game programming Search Knowledge Problem of search: impossible to search to the end of the game Search space of chess is Problem of knowledge: expert knowledge is hard to capture
5
PYIWIT'025 Time Limits and the Horizon Effect Search in games Search in games: Most successful method Decisions have to be made under strict time constraints Basic search method is iterative deepening Search with increasing nominal search depth Use an evaluation function to estimate the probability of winning Horizon effect: no way of knowing what will happen beyond the nominal search depth
6
PYIWIT'026 Pruning and Extension Techniques Example Starting position Nominal search depth Pruning Extensions
7
PYIWIT'027 Pruning and Extension Techniques Research objective Merits of pruning and extensions Pruning saves time Extensions improve reliability Risks of pruning and extensions Important moves are discarded Meaningless extensions can be costly For each game, careful tuning is vital
8
PYIWIT'028 Doesn’t carry over to other games Pruning and Extension Techniques Practical use Pruning and extensions in chess Futility pruning: search is terminated when it is unlikely to recover from a material loss Quiescence search: play out captures beyond the nominal search depth Research Objective Construct a general framework for pruning and extension decisions
9
PYIWIT'029 Threat Analysis General idea Idea Pruning and extension decisions should be based on threats The problems that the search is facing
10
PYIWIT'0210 Threat Analysis Definitions Assume two players B and W (B to move first) A set of threats A partial order on the set of threats If (T i ) > (T j ) then T i has a higher priority than T j Two sets of unresolved threats
11
PYIWIT'0211 Threat Analysis Definitions : the set of threats against B at search depth i : the set of threats against W at search depth i Maximum operator Γ : initial threat sets against B and W
12
PYIWIT'0212 Threat Analysis General goals Safety All threats against player B are resolved Control There is a stronger threat against W than any of the threats against B Problem: how to judge that a threat is resolved? Search is still needed to resolve threats
13
PYIWIT'0213 Pruning rule 1 Prune all moves at search depth N-1 (N is the nominal search depth) that do not resolve any threats Pruning rule 2 Prune all moves at depth i that introduce threats against W with a lower priority than the highest priority threat against B Threat Analysis Pruning rules
14
PYIWIT'0214 Extension rule 1 Extend the search if the highest priority threat of the initial set is still unresolved Extension rule 2 Extend the search if the highest priority threat extends a certain threshold Threat Analysis Extension rules
15
PYIWIT'0215 Empty the threat stack IF THEN execute ELSE defend against Threat Analysis Extensions
16
PYIWIT'0216 Threat Analysis in Shogi Features of shogi The assumptions behind futility pruning and quiescence search do not apply in shogi Pieces captured from the opponent can be re-used Evaluation is a combination of material, attack and defense
17
PYIWIT'0217 Threat Analysis in Shogi Threat set T min : no threat M 1,…M 7 : material threats Capture of a pawn, lance, knight, silver, gold, bishop or rook K 1,…,K 4 : threats against the king. Based on the attack and defense of the eight squares around the king T max : maximum threat, i.e. threat to capture the king
18
PYIWIT'0218 Threat Analysis in Shogi Partial order of threats T max T min M6M6 M7M7 M4M4 M5M5 M2M2 M3M3 M1M1 K4K4 K3K3 K2K2 K1K1
19
PYIWIT'0219 Threat Analysis in Shogi Implementation issues Partial implementation in the shogi program SPEAR Both of the pruning rules Neither of the extension rules A static search extension to empty and
20
PYIWIT'0220 Results Tactical problem test 300 tactical problems from Shukan Shogi Compare the performance of a program without threat analysis (NTA) to a program with threat analysis (TA) 60 seconds per problem on an Athlon 1.2GHz standard PC VersionSolved%Total Time NTA10034%2:52:00 TA10736%2:54:16
21
PYIWIT'0221 Conclusions and Future Work Preliminary results indicate that threat analysis might improve the tactical ability of a shogi program A full implementation of the method is needed to further investigate the merits of the method Self-play experiments are needed to establish whether the improved tactical ability is actually leading to an improvement in playing strength
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.