1 / 21

Threat Analysis to Reduce the Effects of the Horizon Problem in Shogi

Threat Analysis to Reduce the Effects of the Horizon Problem in Shogi. Reijer Grimbergen Department of Information Science Saga University. Presentation Outline. Game programming Time limits and the horizon effect Pruning and extension techniques Threat analysis in two-player games

erasto
Download Presentation

Threat Analysis to Reduce the Effects of the Horizon Problem in Shogi

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. Threat Analysis to Reduce the Effects of the Horizon Problem in Shogi Reijer Grimbergen Department of Information Science Saga University PYIWIT'02

  2. 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 PYIWIT'02

  3. Game ProgrammingDefinitions • 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 PYIWIT'02

  4. Game ProgrammingSearch 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 PYIWIT'02

  5. Time Limits and the Horizon EffectSearch 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 functionto estimate the probability of winning • Horizon effect: no way of knowing what will happen beyond the nominal search depth PYIWIT'02

  6. Pruning Extensions Pruning and Extension TechniquesExample Starting position Nominal search depth PYIWIT'02

  7. Pruning and Extension TechniquesResearch 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 PYIWIT'02

  8. Doesn’t carry over to other games Research Objective Construct a general framework for pruning and extension decisions Pruning and Extension TechniquesPractical 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 PYIWIT'02

  9. The problems that the search is facing Threat AnalysisGeneral idea Idea Pruning and extension decisions should be based on threats PYIWIT'02

  10. Threat AnalysisDefinitions • Assume two players B and W (B to move first) • A set of threats • A partial order on the set of threats • If (Ti) > (Tj) then Ti has a higher priority than Tj • Two sets of unresolved threats PYIWIT'02

  11. Threat AnalysisDefinitions • : 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 PYIWIT'02

  12. Threat AnalysisGeneral 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 PYIWIT'02

  13. Threat AnalysisPruning rules • 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 PYIWIT'02

  14. Threat AnalysisExtension rules • 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 PYIWIT'02

  15. Threat AnalysisExtensions • Empty the threat stack • IF • THEN execute • ELSE defend against PYIWIT'02

  16. Threat Analysis in ShogiFeatures of shogi Pieces captured from the opponent can be re-used Evaluation is a combination of material, attack and defense The assumptions behind futility pruning and quiescence search do not apply in shogi PYIWIT'02

  17. Threat Analysis in ShogiThreat set • Tmin : no threat • M1,…M7: material threats • Capture of a pawn, lance, knight, silver, gold, bishop or rook • K1,…,K4: threats against the king. • Based on the attack and defense of the eight squares around the king • Tmax: maximum threat, i.e. threat to capture the king PYIWIT'02

  18. Threat Analysis in ShogiPartial order of threats Tmax M6 M7 K4 M4 M5 K3 M2 M3 K2 M1 K1 Tmin PYIWIT'02

  19. Threat Analysis in ShogiImplementation 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 PYIWIT'02

  20. ResultsTactical 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 PYIWIT'02

  21. 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 PYIWIT'02

More Related