Victorious Warriors Peter van Emde Boas, ILLC-FNWI-UvA and Bronstee.com Software & Services B.V. Logic in Sun Tzu and the Games played in the Romance of the Three Kingdoms Peking University 20140507 Peter van Emde Boas: Victorious Warriors 20140507 Who am I ? Born: 19450403 ( 4 years before foundation PRC) MS & PhD: University of Amsterdam supervisors: van Wijngaarden, Baayen, Hartmanis (Turing Award winner) Fields: Mathematics, Computer Science, Logic 50 years of professional activity -- van Emde Boas Priority Queue Long term involvement with mayor Conference series (ICALP, TAMC, SOFSEM, CiE, ....) 23 Ph D students, Examinator of 1000 students math, CS, Logic, AI, ... Peter van Emde Boas: Victorious Warriors 20140507 Topics • Introduction: the project “History of Logic in China” • Theory of strategy: then and now • Ancient Chinese Strategy theory as described by Sun Tzu – There is logic in these ancient texts • Example stories related to games from the Romance of the Three Kingdoms – – – – – Lü Bu and Diao Chan Jian Gan steals a letter Cao Cao divides Han Suo and Ma Chao Zhuge Liang borrows arrows The ambush at Huarong Peter van Emde Boas: Victorious Warriors 20140507 A Wild Idea Fenrong Liu Analyze Classical Chinese Strategy Theory from the Perspective of contemporary Game Theory ??! Jeremy Seligman Peter van Emde Boas: Victorious Warriors 20140507 Jun 07 2012 The Project • Preparation for the handbook of the history of logic in China (the meeting at Nankai University in April 2014) • A proposed chapter in this handbook, including topics like: – Ancient Chinese theory of Military Strategy: Sun Tzu and Sun Bin – Connections to Logic, and Game Theory – Example stories from history and/or litterature such as the three kingdoms saga – Contemporary perspective • This presentation is about issues inspired by this project and has a wider perspective – The problems of reconstructing games from stories Peter van Emde Boas: Victorious Warriors 20140507 Join me on a trip to Ancient China Great Wall Wonder Movie in Civilization II Great Wall Wonder Movie in Civilization IV Peter van Emde Boas: Victorious Warriors 20140507 My first encounter with Sun Tzu Sun Tzu War Academy Wonder Movie in Civilization II Peter van Emde Boas: Victorious Warriors 20140507 My first encounter with the three Kingdoms saga During my trip to Guanzhou in 2009 I saw the two part version of this movie during the flights In Europe the reduced single part edition is regularly broadcasted on TV Peter van Emde Boas: Victorious Warriors 20140507 Another source of inspiration Yanjing Wang, ph.d. thesis ILLC, 20100921, Epistemic Modelling & Protocol Dynamics, ch 1 Peter van Emde Boas: Victorious Warriors 20140507 The PhD defense of Yanjing Wang © Peter van Emde Boas ; 20100921 It was a great event…… © Peter van Emde Boas ; 20100921 Peter van Emde Boas: Victorious Warriors 20140507 So I started reading…. Peter van Emde Boas: Victorious Warriors 20140507 Timeline of historic events 771 – 476 BC 551 – 479 BC Around 500 BC 476 – 221 BC Around 360 BC 221 – 207 BC 206 BC – 220 AD 168 – 280 265 – 420 1206 – 1386 Around 1370 1386 – 1644 1522 1644 – 1911 1911 – today Spring and Autumn Period Confucius Sun Wu Warring States Period Sun Bin Qin Dynasty Han Dynasty Romance Three Kingdoms period Jin Dynasty …. Yuan Dynasty Presumed writing of the Three Kingdoms Ming Dynasty Printed edition Three Kingdoms Qing Dynasty Revolution, Civil War, Japanese Occupation, Peoples Republic Peter van Emde Boas: Victorious Warriors 20140507 Some Source Texts Sun Tzu Sun Bin The Art of War The Art of War Romance of the Three Kingdoms around 500 BC around 360 BC around 1400 AD The 13 chapters in Sun Tzu, the Art of War 1 2 3 4 5 6 7 Strategic Assessments Doing Battle Planning a Siege Formation Force Emptiness and Fullness Armed Struggle 8 Adaptations 9 Maneuvring Armies 10 Terrain 11 Nine Grounds 12 Fire Attack 13 On the use of Spies Peter van Emde Boas: Victorious Warriors 20140507 The Authors Peter van Emde Boas: Victorious Warriors 20140507 The Sources Peter van Emde Boas: Victorious Warriors 20140507 Replica of Sun Tzu text in National Museum Beijing Peter van Emde Boas: Victorious Warriors 20140507 Translations/Editions Consider my favourite Sun Tzu quote: Victorious Warriors win first and then go to War, while Defeated Warriors go to War first and then seek to win. Did Sun Tzu actually say/write this? if so, where? Phrases like this appear both at the end of the first chapter (Strategic Assessments) and in chapter four (Formation) Peter van Emde Boas: Victorious Warriors 20140507 Wu Rusong ch4 Cleary ch4 John Minford ch4 Cleary ch1 Cleary ch4 Sawyer ch4 Ames ch 4 Here it appears Cleary ch1 Peter van Emde Boas: Victorious Warriors 20140507 Logic, Games and Ancient Strategy Peter van Emde Boas: Victorious Warriors 20140507 Where is the Logic? • Sun Tzu and Sun Bin express their advice in terms of rules – Using rules means using logic • Information, knowledge and belief are core concepts in their strategic theory – These concepts are studied using logic From the ILLC mission statement: The scientific mission of the Institute for Logic, Language and Computation (ILLC) is to study formal properties of information, viz. the logical structure and algorithmic properties of processes of encoding, transmitting and comprehending information. Peter van Emde Boas: Victorious Warriors 20140507 Semi-structured text Sun Tzu, ed. Wu Rusong, ch 11 Rules Definitions Sun Tzu, ed. Wu Rusong, ch 11 Peter van Emde Boas: Victorious Warriors 20140507 The definitions in this example text 1. 2. 3. 4. 5. 6. 7. 8. 9. San, Dispersive, Within one’s own state Qing, Marginal, Enemy territory (short distance) Zheng, Contested, Advantageous for first occupant Jiao, Open, Accessible to both sides Qu, Focal, Border area of several states Zhong, Critical, Deep in enemy territory Pi, Difficult, Mountains, forests and other natural hazards Wei, Beleaguered, Narrow and tortuous entrances Si, Deadly, Survival is very hard Peter van Emde Boas: Victorious Warriors 20140507 The rules in this example text 1. 2. 3. 4. 5. 6. 7. 8. 9. Do not fight in dispersive region Do not linger in a marginal region Do not strain to attack the enemy in contested region Do no get cut off in an open region Form alliances in focal region Plunder the enemy’s resources in critical region Press ahead in a difficult region Devise contingency plans in a beleaguered region Fight with all courage and energy in a deadly region Peter van Emde Boas: Victorious Warriors 20140507 Where is the Game Theory? • Game theory is a mathematical theory aimed at the description of behavior of opponents (agents) in strategic interaction • This is what the ancient Chinese strategy thinkers were doing also, except for the missing Mathematics… – Linear algebra, probability theory,… • The Game theoretical ingredients can be found primarily in the historical stories Peter van Emde Boas: Victorious Warriors 20140507 About these connections • The texts of Sun Tzu and Sun Bin were almost unknown in the Western world before 1950 • Interesting modern ideas can be found in these texts (and histories) which are 2500 years old. – Analyzing the situation – Information – Theory of mind reasoning (E.G. in the three kingdoms stories) • These modern ideas play a role in Game Theory Peter van Emde Boas: Victorious Warriors 20140507 Analyzing the situation Military Tradition Splash screen in Civilization IV Peter van Emde Boas: Victorious Warriors 20140507 Analyzing the situation Victorious warriors win first and then go to war, while defeated warriors go to war first and then seek to win Sun Tzu, the Art of War This phrase invites to analyze the situation before engaging in battle. Is this a form of game analysis? Did the ancient Chinese actually use such an analysis? If so, can we find evidence for this in ancient texts? Peter van Emde Boas: Victorious Warriors 20140507 Information and Spies An expendable agent is one who is deliberately given false information to mislead the enemy Information is mentioned as a transferable entity This is around 500 BC Wu Rusong ch13 Peter van Emde Boas: Victorious Warriors 20140507 Theory of mind reasoning • Ambush at Huarong – See the quotation by Yanjing Wang – Presented in more details later – Believed to be fictitious • Empty City strategy – Strategy 32 in the 36 strategies – Famous example by Zhuge Liang in the three kingdoms saga (believed to be historical rather than fictitious) Peter van Emde Boas: Victorious Warriors 20140507 Some other Sun Tzu Quotes Peter van Emde Boas: Victorious Warriors 20140507 Be prepared The art of war teaches us to rely not on the likelihood of the enemy’s not attacking, but rather on the fact that we have made our position unassailable. Great Wall wonder Splash screen quote from Sun-Tzu in Civilization V Sun Tzu, ed. Wu Rusong, ch8 Peter van Emde Boas: Victorious Warriors 20140507 Know thy Enemy Sun Tzu, ed. Clarey, ch3 Peter van Emde Boas: Victorious Warriors 20140507 Deception is everything If he is united as one, divide him Divide et Impera (divide and conquer) Sun Tzu, the Art of War, ch 1; ed. Wu Rusong Peter van Emde Boas: Victorious Warriors 20140507 Divide et Impera in Roman History Peter van Emde Boas: Victorious Warriors 20140507 Strategic Theory, then and now Peter van Emde Boas: Victorious Warriors 20140507 Theory of Military Strategy This text was written in 1832 Start of Strategic Theory ?? Peter van Emde Boas: Victorious Warriors 20140507 Sun Tzu, the Art of War This text was written around 500 BC Peter van Emde Boas: Victorious Warriors 20140507 The changed nature of War Guandu 200 AD Solferino 1859; national armies Normandy 1944; mechanisation Syria today; insurgents Peter van Emde Boas: Victorious Warriors 20140507 The ultimate game changer Hiroshima 1945 War is no longer a constant-sum game; It is no longer clear which actions of policy makers are rational. Anatol Rapoport Peter van Emde Boas: Victorious Warriors 20140507 Classic perspective • Mercenary armies • • • • • • Soldiers fight for who pays, feeds or owns them Observe Warriors code of honour Commanders participate in combat Defeat the enemy; don’t destroy him Prevent casualties, if possible If defeated, you may switch side The Chinese ancient strategy theoreticians must be understood from this classic perspective Is this correct ? Alexanderschlacht, Alex Altdorfer Alte Pinakotek, Műnchen Peter van Emde Boas: Victorious Warriors 20140507 Commanders in combat Beijing, Summer palace, long corridor; the nightly combat between Ma Chao and Zhang Fei Peter van Emde Boas: Victorious Warriors 20140507 Compare with von Clausewitz Peter van Emde Boas: Victorious Warriors 20140507 Compare with von Clausewitz • The idea that you can overcome the enemy using strategy only, without serious fighting is a severe error • Stratagems are to be used as a last resort only Chinese advocate deception in all circumstances; For a last resource advice look at Strategy 36 from the 36 strategies of ancient China If nothing else works, retreat Peter van Emde Boas: Victorious Warriors 20140507 Stories and games Peter van Emde Boas: Victorious Warriors 20140507 Analyzing texts • We learn about ancient Chinese events from history texts and literature • These sources provide us with Stories • We read about the use of Stratagems in these stories (tricks of deceit during warfare) • What does this tell about the actual strategic situation? About the Games involved? Peter van Emde Boas: Victorious Warriors 20140507 The Oberver from Mars problem How much can the Martian Observer learn about the Go Game by observing a (single) play performed by human players? Peter van Emde Boas: Victorious Warriors 20140507 Reconstructing Games from Stories From a given story, invent some plausible game so that the story becomes a play in the game. This makes it possible to appreciate the behavior of the agents in the story Were they rational, wise, sensitive, compassionate, …? And did they use any kind of game analysis at all? Peter van Emde Boas: Victorious Warriors 20140507 A possible approach: Narratology • A form of literature study, aimed at constructing formal representations of the content of stories • Primary target: a sequence of events • But that’s not all – – – – What did agents knew? What did agents believe? What did agents desire? What did agents expect? • Are two stories similar or equivalent? • Are the stories instances of similar or equivalent games? • It is a non-trivial task! • So far we did not attempt to use this approach for our Chinese texts Peter van Emde Boas: Victorious Warriors 20140507 Example of Narratology study Higher order theory-of-mind representation of preferences and/or expectations of agents participating in the stories. Example stories from popular TV crime series Peter van Emde Boas: Victorious Warriors 20140507 Example stories • Lu Bu and Dian Chao – Reconstruction of game from story • Jian Gan steals a letter – Information; the expendable spy • Cao Cao divides Ma Chao and Han Suo – Information; non-information works also • Zhuge Liang borrow arrows – Multiple games played simultaneously • The ambush at Huarong – Theory-of-mind reasoning Peter van Emde Boas: Victorious Warriors 20140507 Lü Bu and Diao Chan Used as an example for strategy 31 (Strategy of the beautiful women) in my edition of the thirty-six strategies of Ancient China Peter van Emde Boas: Victorious Warriors 20140507 Set-up of the story Dong Zhuo, after the gang of ten Eunuchs who have corrupted the court has been eliminated, is usurping power in the late Han empire. He obtains the service of Lü Bu, a fierce and invincible warrior, to protect him. Dong Zhuo disposes the ruling emperor Ling and has him replaced by his weaker and younger brother Xian. The former emperor Ling is killed. Dong Zhuo behaves more and more as a Tyrant. Minister of the interior Wang Yun sees more and more heads rolling around him, and fears his head will be next on the block. Together with Diao Chan – a beautiful girl in his household, Wang Yun designs a plot to destroy the good relation between Dong Zhuo and Lü Bu. Peter van Emde Boas: Victorious Warriors 20140507 Wang Yun and Dioa Chan forge a plot to separate Lü Bu and Dong Zhuo Peter van Emde Boas: Victorious Warriors 20140507 The story of Lü Bu and Diao Chan Wang Yung invites Lü Bu for dinner; offers him Diao Chan as bride Wang Yung invites Dong Zhuo for dinner; offers him Diao Chan as concubine Observing Diao Chan in the palace of Dong Zhuo, Lü Bu asks Wang Yung for explanation; he tells that Dong Zhuo obtained Diao Chan by political pressure Lü Bu meets Diao Chan in the palace garden; she confirms Wang Yung story Dong Zhuo observes this meeting; Diao Chan tells him that Lü Bu attempted to seduce her The plot succeeds; Dong Zhuo and Lu Bü become enemies. Later Lü Bu will kill Dong Zhuo and marry Diao Chan Peter van Emde Boas: Victorious Warriors 20140507 What is the Game? The story introduces four agents, and a sequence of events. Which events offer a choice point where a strategic move is made? What would be the alternative moves at such a position? The story involves lies; hence ascribing belief states to agents is essential for really understanding what happens. (but we have not yet done it) What about preferences and/or utilities? Peter van Emde Boas: Victorious Warriors 20140507 Events in a possible model Offer as bride Offer as concubine Observation by Lü Bu Lies by Wang Chun and Diao Chan Which choices are open for other agents? Observation by Dong Zhuo Lie by Diao Chan Plot Succeeds Peter van Emde Boas: Victorious Warriors 20140507 Offer as bride Accept offer? Y N Y N Offer as concubine Accept offer? Disregard? Observation by Lü Bu Lies by Wang Chun and Diao Chan N Y Y N Believe lies? Observation by Dong Zhuo N Y Y N Disregard? Lie by Diao Chan Believe lie? Plot Succeeds Possible Choice Points added Peter van Emde Boas: Victorious Warriors 20140507 Offer as bride Accept offer? [???0] Y N Y N Offer as concubine Accept offer? Observation by Lü Bu [?++?] [---+] N Y Disregard? Lies by Wang Chun and Diao Chan [---+] Believe lies? Y N N Y Y N Observation by Dong Zhuo [?--?] Disregard? Lie by Diao Chan Believe lie? [?--?] Plot Succeeds [ + + + 1/2 ] Peter van Emde Boas: Victorious Warriors 20140507 Utilities ? Jian Gan steals a letter Example of the use of information; the expendable spy strategy Peter van Emde Boas: Victorious Warriors 20140507 Jian Gan steals a letter Cao Cao sends an secret envoy, Jiang Gan, to Zhou Yu (the enemy commander), in order to convince the latter to surrender. Zhou Yu, recognizes that it is a spy, but receives and feasts him like an old friend. During the night he arranges that Jian Gan finds a secret letter, written by the two admirals of Cao Cao, indicating that they intend to defect to Zhou Yu. Jiang Gan steals the letter. Upon return Jiang Gan informs Cao Cao about his findings; the two admirals are beheaded. However, the letter was a planted forgery; the admirals were innocent, and Cao Cao realises that he has been tricked only after the execution. Romance of the three Kingdoms, chapter 45 Peter van Emde Boas: Victorious Warriors 20140507 This example is an instance of the expendable agent strategy An expendable agent is one who is deliberately given false information to mislead the enemy Sun Tzu, the Art of War, Wu Rusong ch13 Peter van Emde Boas: Victorious Warriors 20140507 Cao Cao divides Han Suo and Ma Chao Example of use of non-information After his defeat at Red Cliffs (208), the attempts of Cao Cao to extend the territory he controls to the south come to halt. A few years later he attempts to get the Northwest regions under his control (211). His first opponent there is Han Sui, who is served by his nephew Ma Chao. Earlier Cao Cao has killed the father of Ma Chao and two of his brothers. Initially Cao Cao had tried to convince Han Sui to surrender and to deliver Ma Chao to him, but Han Sui refused. Han Sui goes to war against Cao Cao, but at Tong Pass, after some initial victories by Ma Chao, the two armies get stuck in a stalemate. Winter is arriving and the two parties start negotiating a truce. Seeing no way to defeat Ma Chao, Cao Cao designs a plot to create division between Ma Chao and Han Sui. Romance of the three Kingdoms, chapt 59 Peter van Emde Boas: Victorious Warriors 20140507 Cao Cao’s plot In between battles Cao Cao has a discussion with Han Sui; they discuss in public old events rather than the actual status. Cao Cao sends a letter to Han Sui filled with erasures; asked for an explanation by Ma Chao, Han Sui can’t explain why Cao Cao has produced such a sloppy contentless document. Cao Cao and Han Sui, have another discussion at the battle field, where Cao Cao expresses thanks for the earlier words of Han Sui. These developments make Ma Chao more and more suspicious, and Han Sui feels it. Subsequently he figures out that defecting to Cao Cao is after all the wisest policy at this stage. However his intentions to defect to Cao Cao and organize an murder attempt on Ma Chao become known to Ma Chao. Ma Chao attempts a preemptive strike on Han Sui, who is saved by Cao Cao, and Ma Chao narrowly escapes. Cao Cao is now victorious at Tong Pass. Romance of the three Kingdoms, chapt 59 Peter van Emde Boas: Victorious Warriors 20140507 Romance of the three Kingdoms, chapt 59 Peter van Emde Boas: Victorious Warriors 20140507 Use of non-information • Cao Cao divides Han Suo and Ma Chao by creating the impression that he exchanges secret information with Han Suo • But in reality nothing is exchanged • Still Ma Chao is convinced that a plot against him is designed and attacks Han Suo as a preemptive strike Peter van Emde Boas: Victorious Warriors 20140507 Hear the commentary Peter van Emde Boas: Victorious Warriors 20140507 The commentaries • The first comment expresses how ingeniously Cao Cao succeeds in making Ma Chao suspicious • The second comment states that the key difference is that in this example the exchange of information is public, contrary to the Jian Gan example, where the communication is secret • I see yet another important difference: information vs. non information Peter van Emde Boas: Victorious Warriors 20140507 Borrowing Arrows Two games being played simultaneously Peter van Emde Boas: Victorious Warriors 20140507 Zhuge Liang (Kongming) borrows arrows Kongming plays and wins two games at the same time: -- Strategem against Cao Cao -- Saves himself from Zhou Yu’s plot Before the battle at Red Cliffs (208 AD) Zhou Yu assigns to Kongming (Zhuge Liang) the “mission impossible” task of procuring 100 000 arrows. Kongming assembles a small fleet of 20 ships covered by straw and feigns an attack at Cao Cao on the opposite side of the river at dawn in the fog. Cao Cao’s troops are deceived and fire more than 150 000 arrows which are well preserved in the straw, and collected. Romance of the three Kingdoms, Chapter 46 Peter van Emde Boas: Victorious Warriors 20140507 Archery Splash screen in Civilization IV Peter van Emde Boas: Victorious Warriors 20140507 The ambush at Huarong Peter van Emde Boas: Victorious Warriors 20140507 The ambush at Huarong • Cao Cao is retreating from the defeat at Red Cliffs • He must take the mountain road or the road through the valley • His scouts inform him that there are fires lit along the mountain road • Cao Cao, believing that the fires are intended to deceive him into taking the valley road, decides to take the mountain path • But the ambush actually is located along the mountain road, since Zhuge Liang predicted how Cao Cao would reason Peter van Emde Boas: Victorious Warriors 20140507 The formal representation E W E -1/1 1/-1 W 1/-1 -1/1 Cao Cao does not want to be ambushed He can take the valley or the mountain road Lord Guo can stage the ambush in the valley of the montain road If both warriors select the same location Lord Guo wins; otherwise Cao Cao escapes This game is known as the game of matching pennies in Game Theory Peter van Emde Boas: Victorious Warriors 20140507 Ambush at Huarong • As a game it is just Matching Pennies • Actually Zhuge Liang may loose the game, by moving first (exposing his position) • Cao Cao uses second order theory-of-mind reasoning – Reasoning about what Zhuge Liang could reason • Zhuge Liang uses third order theory-of-mind reasoning – Reasoning about what Cao Cao could reason about what Zhuge Liang could reason • Therefore Zhuge Liang wins Peter van Emde Boas: Victorious Warriors 20140507 Cao Cao’s reasonings Cao Cao refers to Sun Tzu Romance of the three Kingdoms, ch 50 Peter van Emde Boas: Victorious Warriors 20140507 Zhuge Liang’s reasoning Zhuge Liang Predicts that Cao Cao will refer to Sun Tzu Romance of the three Kingdoms, ch 49 Peter van Emde Boas: Victorious Warriors 20140507 What are they talking about Appear to be far away when actually nearby, and vice versa This story includes a direct reference to the teachings of Sun Tzu Sun Tzu, the Art of War, ch 1; ed. Wu Rusong Peter van Emde Boas: Victorious Warriors 20140507 Cao Cao escapes Cao Cao actually is ambushed three consecutive times during his retreat after the battle at Red Cliffs. At Huarong he is granted free passage by the local commander Lord Guan Romance of the three Kingdoms, ch 50 Is the cliffhanger a Chinese Invention ?? Peter van Emde Boas: Victorious Warriors 20140507 Hear the commentator Peter van Emde Boas: Victorious Warriors 20140507 Again Zhuge Liang is playing two games at the same time • Before assigning the final ambush to Lord Guan, Zhuge Liang has predicted that Lord Guan will let Cao Cao escape • This is essential for the future – His lord Liu Bei is not yet ready to cope with his “ally” Sun Quan and his general Zhou Yu – Therefore Cao Cao should not yet be eliminated Peter van Emde Boas: Victorious Warriors 20140507 Zhuge Liang predicts the outcome Guan Yu puts his head at stake Romance of the three Kingdoms, ch 49 Peter van Emde Boas: Victorious Warriors 20140507 Why I like this story? • Use of third order theory-of-mind reasoning – Do you know of other examples ? • Explicit reference to the teachings of the Ancient Chinese theoreticians of strategy Peter van Emde Boas: Victorious Warriors 20140507 Concluding remarks Peter van Emde Boas: Victorious Warriors 20140507 Reconstructing games from stories? • Martian observer’s problem – We only have one game play available • Several games played in parallel – Fusing several games into a big game creates problems of preference aggregation • Do we get games at all? – The assumption of common knowledge of the game may be violated – The agents may have (false) beliefs on the preferences of others Peter van Emde Boas: Victorious Warriors 20140507 Loose Ends • Many more texts remain to be studied (seven classics) • Are there more stories involving higher theory-of-mind reasoning? • What happened inbetween 500 BC and 1832? • Did the Chinese learn to prepare for the tricks of their opponents? • What was done outside China? – Roman authors? Peter van Emde Boas: Victorious Warriors 20140507 Romance of the three Kingdoms, ch 1 Romance of the three Kingdoms, ch 120 Peter van Emde Boas: Victorious Warriors 20140507 The end Peter van Emde Boas: Victorious Warriors 20140507