Presentation is loading. Please wait.

Presentation is loading. Please wait.

Conflict Resolution of Chinese Chess Endgame Knowledge Base Bo-Nian Chen, Pangfang Liu, Shun-Chin Hsu, Tsan-sheng Hsu.

Similar presentations


Presentation on theme: "Conflict Resolution of Chinese Chess Endgame Knowledge Base Bo-Nian Chen, Pangfang Liu, Shun-Chin Hsu, Tsan-sheng Hsu."— Presentation transcript:

1 Conflict Resolution of Chinese Chess Endgame Knowledge Base Bo-Nian Chen, Pangfang Liu, Shun-Chin Hsu, Tsan-sheng Hsu

2 Outline Introduction Theoretical Foundations Basic Conflict Reduction Algorithm Refinements Experimental Results Conclusions and Future Work

3 Methods in Each Game Phase Chinese Chess Program Search Opening Game (Strong) Middle Game (Strong) Endgame Open Database Computer Not Generatable (Weak) Computer Generatable (Strong) Strong Pieces Num on Each Side 8~63~06~3

4 Previous Endgame Solutions Computer-generatable endgames Need too much memory Contain too many pieces for current retrograde algorithms Computer-not-generatable endgames – heuristic strategy Utilized by search algorithm Not perfect but useful in tournaments

5 Endgame Knowledge Base Material combination A set of pieces in a position e.g. KCMKRP Endgame heuristic Material combination with a score value e.g. KRPKGGMM, 0 (win) Endgame knowledge base Contain large amount of endgame heuristics Construction A basic knowledge base – by the human expert Large knowledge base – by automatic generation algorithm Conflicts between heuristics exist

6 Conflict and Resolution in Endgame Knowledge Base Piece additive rule Add a piece to a material combination cannot be more disadvantageous than original one Remove a piece from a material combination cannot be more advantageous than original one Conflict checking and reduction Use piece additive rule to check conflict

7 Using Lattice to Represent the Material Structure Transform heuristics into lattice structure Node: heuristic value of a material combination Directed edge: link to a worse node to the red side that only differ by one piece All edges in lattice structure follow piece additive rule Heuristics in lattice structure are partially comparable

8 An example of lattice structure for endgame K KRKKHKKCK KKRKKPKKM KRHKKHKR KKRM KRHKRKHKRM KRHKRMKHPKRM Level 0 Level 1 Level 2 Level 3 Level 4

9 Construction Strategy of Material Structure Construction of a basic knowledge base The human expert gives the score values Construction of large knowledge base Construct by automatic generation algorithm Extend original knowledge base by adding their neighbors in each iteration

10 Definitions Mirrored material combination Red pieces and black pieces are swapped E.g. KCMKRP ↔ KRPKCM Invariable nodes Modified by the human expert and cannot be changed by conflict reduction algorithm Inconsistency Score values of adjacent nodes violate piece additive rule The indicated nodes are inconsistent nodes The edge between them is called inconsistent edge An Inconsistent edge leads to an inconsistent neighbor Inconsistent percentage #(inconsistent neighbor) / #(neighbor)

11 Score Values Score valuesDescription 0 (win)the red player usually wins 1 (most win)the red player wins in many cases, but draws in some cases 2 (advantage)the red player has an advantage, but not so easy to win 3 (slight advantage)the red player is a little better, but usually cannot win 4 (balance of power)any one player has a chance to win 5 (almost draw)no player has a chance to win 6opposite to 3 7opposite to 2 8opposite to 1 9opposite to 0

12 Comparison of Conflict in Lattice Structure KCCKHCPGG KCCKHCGGKCCKHCPG KCCKCPGG KCCKHPGG KCCKHCPGGM 3 4 6 5 3 6

13 Comparison of Conflict in Lattice Structure KCCKCPGG KCCPKCPGGKCCKCPG KCCMKCPGG KCCGKCPGG KCKCPGG KCCKCPGGM 5 3 3 3 4 8 3 KCCKHCPGG 3 KCCKCCPGG 6 KCCKPGG 1 KCCKCPPGG 6 KCCKCGG 3

14 Conflict Computation Inconsistent edge checking Detect inconsistent edges in lattice structure Check the consistency of mirrored material combinations Conflict computation algorithm Perform inconsistent edge checking on each node in lattice structure Output Number of inconsistent nodes Numbers of inconsistent nodes in ranges of (0% - 10%], (10% - 20%], …, (90% - 100%], each range is an inconsistency level Time complexity is O(MN) M is the maximum number of neighbors of a node N is the number of nodes

15 Basic Conflict Reduction Algorithm The four steps Conflict computation Compute conflicts among all nodes Candidate selection Find a node with maximum conflict rank to modify Use inconsistent percentage of each node as its conflict rank Score value selection Choose a score value with a best corrected score for the candidate node Use the total number of inconsistent nodes after assign a score value as its corrected score Modification Change the score value of the candidate node The actual process of the algorithm Repeats the four steps until no candidate can be selected If there are still conflicts, forward the data to the human expert to do some further modifications Rerun the conflict reduction algorithm until zero- conflict

16 Refinement: Diffusing Algorithm Why refinements are needed? Reduce more conflict in an iteration Improve efficiency of conflict reduction algorithm Decrease the loading of the human expert Strategies First start from one selected node Check if it can assign only one score value without violating the invariable node If yes, modify the node and recursively perform diffusing algorithm

17 Refinement: Ranking and Scoring Strategies A better conflict rank formula Favors nodes with more neighbors A better corrected score formula I i represents the number of inconsistent nodes in an inconsistency level Favors score values with less nodes in large inconsistent percentage

18 Final Verification Problems in consistent endgame knowledge base May contain isolated incorrect subsets May contain errors that do not violate consistency K-Random sampling verification Further check the correctness of the endgame knowledge base Do further modification to improve its correctness Distance of all sampling nodes are at least K Avoid sampling too close by nodes Ensure the sampling to be uniform

19 Experiment Design Test data Basic endgame knowledge bases: END65, END60, END50 Automatic-generated knowledge bases: END64, END59, END49 Extend by adding neighbor nodes of basic knowledge bases Use advanced inferencing with probabilities to obtain score value of each material combination Number of Heuristics in each data set END65: 17,038 END60: 422 END50: 1,499 END64: 47,621 END59: 2,722 END49: 3,938 ENDALL: consist of all above data sets, totally 69,595 nodes

20 Comparison of Reduction Ability BA: basic algorithm RA: refined algorithm DB sizeorg errorBAiterationRAiteration END644762114616978669703 END5927221786133031662 END49393813624386453 ENDALL69595164881110865854

21 Correctness Analysis in Consistent Endgame Knowledge Bases n: number of ENDALL, n=69595 P: sample percentage, P=1% IR: inverted results D: error distance ErrNumD ≥ 4D = 3D = 2D = 1D = 0IR Sample19202157501 Sample212702911601 Sample39902168010 Average106.00.02.013.3390.330.330.66 n/P106000200133390333366 %15.2300.281.9112.970.00 Confidence1533020013330066 %2.2000.281.910.00

22 Comparison of Consistent And Original Knowledge Bases IR: inverted results D: error distance DB sizeErrNumD ≥ 4D = 3D = 2D = 1D = 0IR END65170381100624174894280 END60422482683208 END50149922241634168010 END644762120908105620421952158580708 END59272217345943901426062290 END49393819826032501840050 ENDALL69595244861652239222861815421064

23 Conclusions Contributions of this paper Solve consistency problem in endgame heuristics utilized by search algorithms The strategy is suitable for large amount of heuristics The obtained consistent heuristics are verified by random sampling and achieve high accuracy Future work Enhance our algorithm to be more sensible of advantage Represent the advantage difference of two adjacent nodes  e.g. adding a rook is different from adding a pawn in advantage Inconsistency can be classified by the difference of score values  e.g. a red win nodes assigned with a black win score is more severe than assigned with a draw score Use weighted graph


Download ppt "Conflict Resolution of Chinese Chess Endgame Knowledge Base Bo-Nian Chen, Pangfang Liu, Shun-Chin Hsu, Tsan-sheng Hsu."

Similar presentations


Ads by Google