Computer Chinese Chess
Tsan-sheng Hsu
tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu
1
Computer Chinese Chess Tsan-sheng Hsu tshsu@iis.sinica.edu.tw - - PowerPoint PPT Presentation
Computer Chinese Chess Tsan-sheng Hsu tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu 1 Abstract An introduction to research problems and opportunities in Computer Games. Using Computer Chinese chess (
tshsu@iis.sinica.edu.tw http://www.iis.sinica.edu.tw/~tshsu
1
⊲ Data-intensive computing: tradeoff between computing on the spot and using pre-stored knowledge.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ They provide a structured task in which it is very easy to measure success or failure. ⊲ They did not obviously require large amount of knowledge.
⊲
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
solved
world champion grand master amateur Awari Chess Go (9 ∗ 9) Bridge Go (19 ∗ 19) Othello Draughts (10 ∗ 10) Chinese chess Shogi Checkers (8 ∗ 8) Scrabble Hex Backgammon Amazons Lines of Action ⊲ Over champion means definitely over the best human player. ⊲ World champion means equaling to the best human player. ⊲ Grand master means beating most human players.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ J. von Neumann, 1928, “Math. Annalen” ⊲ C.E. Shannon, 1950, Computer Chess paper ⊲ Alan Turing, 1953, chapter 25 of the book “Faster than thought”, en- titled “Digital Computers Applied to Games”
⊲ Started from about 1981.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Databases. ⊲ Many pseudo theories with heavy human involvements.
⊲ Traditional game tree searching. ⊲ In search of a good evaluating function.
⊲ Heuristics and knowledge. ⊲ Computer constructed databases.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ It is possible to attack or protect a piece at a longer range.
⊲ The mobility of the pawn is limited before crossing the river. ⊲ It cannot move backward.
⊲ Although Knight is roughly equal to Cannon , Rook + Knight + Cannon is better than Rook + 2 Cannons . ⊲ Knowledge inferencing among material combinations [Chen et al. 2007,2011].
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Learning form a vast amount of prior human knowledge. ⊲ In great need of some breakthrough.
⊲ Western chess: 10123 ⊲ Chinese chess: 10150 ⊲ Deeper searching depth and longer game.
⊲ The usage of materials. ⊲ Knowledge inferencing among material combinations.
⊲ The size of useful endgames is huge compared to that of Western chess.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Cannons can “jump” over pieces, rooks can attack in straight-lines, and knights can attack in a very different way. ⊲ Guards are better in protecting the king in facing a rook attack. ⊲ Guards are not good in protecting the king in facing a cannon attack.
⊲ KCPGMMKGGMM is a red-win endgame. ⊲ KNPGMMKGGMM is a draw endgame.
⊲ KPPKGG and KPPKMM are red-win endgames. ⊲ KPPKGM is a draw endgame.
⊲ KNPKGM and KNPKGG are red-win endgames. ⊲ KNPKMM is a difficult endgame for red to win.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ 紅
⊲ 紅
side takes a very good position. ⊲ 紅
side is in a very good position. ⊲ 紅
is a draw. ⊲ 紅
⊲ 均
⊲ 必
⊲ 黑
⊲ 黑
it is a draw. ⊲ 黑
side is in a very good position. ⊲ 黑
side takes a very good position. ⊲ 黑
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Input error. ⊲ Cognition error. ⊲ Approximation and conversion error.
⊲ It is difficult to be 100% sure that there is no conflict.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Different conclusions were made in different eras. ⊲ Different conclusions were made by different authors. ⊲ Some books discuss an endgame extensively with detailed positions, but have no general conclusions.
⊲ How to convert rates to levels?
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ gaining extra pieces on your side; ⊲ losing pieces on your opponent’s side.
⊲ by losing pieces on your side; ⊲ if your opponent gains piece.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ the direction from u to v if the value of u must be no worse than that
KNCPGKNPP KNPP KNCG KNCG KNP KNPP KNCP KNPP KNC KNPP KNPG KNPP KCPG
advantage to red slightly better to black tie tie great advantage to black advantage to black great advantage to red
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
A B
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Piece exchanges: you cannot get better by exchanging a stronger piece with a weaker piece. ⊲ Depending on the piece involved, assign a confidence factor, e.g., adding a rook and adding a knight have different levels of confidence.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Asia rule example #2.
⊲ Asia rule example #19.
⊲ Asia rule example #31.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ R4=5,K5=6,R5=4,K6=5,... ⊲ Red Rook checks Black King.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ C2−1,R4−2,C2+2,R4+2,... ⊲ Red Cannon at the 2nd column chases Black Rook.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ R2=1,C9=8,R1=2,C8=9,... ⊲ Black Cannon at the 9th column threatens to checkmate.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ R8+2,G6+5,R8−2,G5−6,... ⊲ Red Knight at the 2nd column is not protected. ⊲ Black Rook at the 6th column cannot threaten.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ P7=6,M1+3,P6=7,M3−1,... ⊲ The protector of Black Knight at the 7th column is blocked.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Supported by Asian Chinese Chess Association. ⊲ Simple and effective. ⊲ Is not really “fair” in certain complex cases. ⊲ Taiwan version (2007) is based on Asian version.
⊲ Supported by the PRC Chinese Chess Association. ⊲ A national standard. ⊲ Developing still in progress: latest version dated 1999. ⊲ Try to be as complete and ”fair” as possible.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ May lose advantage. ⊲ Must allow loops in endgame construction.
⊲ Only one side has attacking pieces: all are implemented. ⊲ One side has only a pawn and some defending pieces: can be affected by special rules.
⊲ Implement only the rules related to “checking.” ⊲ Implement some “chasing” rules. ⊲ Verify whether special rules can affect an endgame.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Less than 3 % of the games played.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Red Knight at 3rd column is protected. ⊲ The game ended in a draw.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ KCPGGMMKGGMM ( vs. ): the database consisting of RED Cannon and Pawn, and Guards and Ministers from both sides.
⊲ What is the best possible outcome, i.e. win/loss/draw, that the player can achieve starting from this position? ⊲ What is a strategy to achieve the best possible outcome?
⊲ win/loss/draw; DTC; DTZ; DTR.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Each vertex is called a position. ⊲ May want to remove symmetry positions.
⊲ Bipartite. ⊲ Huge number of vertices and edges for non-trivial endgames. ⊲ Example: KCPGGMMKGGMM has 1.5∗1010 positions and about 3.2∗ 1011 edges.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
... OR search ... AND search ... ... ... ... ...
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Watch out the and-or rules.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
terminal positions
backward propagation TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ so called “distance-to-capture” (DTC); ⊲ the traditional metric is “distance-to-mate” (DTM).
⊲ KCKGGMM ⊲ KPKGGMM ⊲ KCPKGMM, KCPKGGM
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ a stable position is a pendant in the current state graph; ⊲ a propagated position is removed from the sate graph; ⊲ no vertex in a cycle can be a pendant.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Threaten the opponent and fall into a repeated sequence is illegal. ⊲ You can threaten the opponent only if you have attacking pieces. ⊲ The stronger side does not need to threaten an opponent without at- tacking pieces. ⊲ All positions in cycles are draws.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Roughly 7.75 ∗ 109 positions per endgame. ⊲ Perfect information. ⊲ 1.5 – 3 ∗1012 bytes for all 3- to 6-piece endgames.
⊲ Using parallel machines. ⊲ Win/loss/draw.
⊲ Currently the largest endgame database of any games using a sequential machine. ⊲ Win/loss/draw. ⊲ Solved in the year 2007 with a total endgame size of 3.9 ∗ 1013.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ About 4 ∗ 106 positions; Perfect information.
⊲ About 2 ∗ 109 positions; Perfect information.
⊲ About 8.8 ∗ 109 positions; 2.6 ∗ 10−5 seconds per position; Perfect in- formation. ⊲ The largest single endgame database and the largest collection reported.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Pi > Pj means Pi is better than Pj. ⊲ Pi = Pj means Pi is about the same as Pj. ⊲ Pi ≥ Pj means Pi is no worse than Pj.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Let Pi+1 = Pi + M.
? ? A B C D
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ It has been estimated by Levy and Newborn that doubling the computer speed gains approximately fifty to seventy ELO points in playing strength for chess. ⊲ However, this applies mainly to computer-vs-computer matches, and not to computer-vs-human matches. ⊲ Remark: cited from Wiki.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ The version we used for Computer Olympiad 11 (May 2006). ⊲ Searching speed: 5.5 M nodes per second during middle game.
⊲ The latest version (upto May 2007). ⊲ Adding 6000+ lines of code (for the evaluation function) to version 814. ⊲ Searching speed: 2.8 M nodes per second during middle game.
⊲ This CPU has two cores. ⊲ Each version uses one core.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ From 5 seconds, 10 seconds, . . . , 60 seconds.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Each win: 2 points. ⊲ Each draw: 1 point. ⊲ Each loss: 0 point.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Need 2 to 3 more times of running time in order for the search depth to increase 1.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ multi-threading; ⊲ faster architecture, CPU or RAM; ⊲ · · ·
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ It becomes bad for a while, then it becomes good again.
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
⊲ Knowledge extracting. ⊲ Data mining. ⊲ . . .
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c
TCG: Computer Chinese Chess, 20160106, Tsan-sheng Hsu c