General Game Playing

1,652 views

Published on

A brief overview of the emerging AI field of "General Games". This presentation was originally given as part of the Researchers' Digest series at University of Strathclyde on 14th Dec 2009.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,652
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
45
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • General Game Playing

    1. 1. General Game Playing 1
    2. 2. Games and AI • As long as there have been games requiring more than one player, there has been a desire to play them with fewer people using automated opponents. 2
    3. 3. Some History 3
    4. 4. Some History • The Mechanical Turk, developed in 1770, was “capable” of playing games of chess automatically. 3
    5. 5. Some History • The Mechanical Turk, developed in 1770, was “capable” of playing games of chess automatically. • It was actually a fraud, but the interest in the technology has been there for 250 years. 3
    6. 6. Deep Blue 4
    7. 7. Deep Blue • Initially a joint Carnegie Mellon / IBM project called “Deep Thought” 4
    8. 8. Deep Blue • Initially a joint Carnegie Mellon / IBM project called “Deep Thought” • Poor performance led to a second incarnation as “Deep Blue” 4
    9. 9. Deep Blue • Initially a joint Carnegie Mellon / IBM project called “Deep Thought” • Poor performance led to a second incarnation as “Deep Blue” • Beat Kasparov in one game ’96, won* a rematch in ’97 4
    10. 10. Deep Blue • Initially a joint Carnegie Mellon / IBM project called “Deep Thought” • Poor performance led to a second incarnation as “Deep Blue” • Beat Kasparov in one game ’96, won* a rematch in ’97 • Brute force approach - not sophisticated 4
    11. 11. Chinook 5
    12. 12. Chinook • Checkers player developed at University of Alberta in 1989 5
    13. 13. Chinook • Checkers player developed at University of Alberta in 1989 • Placed 2nd in US Nationals. Won the 1994 Man vs. Machine World Championship 5
    14. 14. Chinook • Checkers player developed at University of Alberta in 1989 • Placed 2nd in US Nationals. Won the 1994 Man vs. Machine World Championship • Has a playbook of opening moves, a method of evaluating game states and a prior knowledge of all end-game states 5
    15. 15. What are “General Games”? 6
    16. 16. What are “General Games”? • Most famous players can play a single game. 6
    17. 17. What are “General Games”? • Most famous players can play a single game. • They use specific knowledge about these games to become good players. 6
    18. 18. What are “General Games”? • Most famous players can play a single game. • They use specific knowledge about these games to become good players. • General Games are not known by the player in advance. Given just a description they must work out how best to play. 6
    19. 19. Why? 7
    20. 20. Why? • There’s little scientific value of making AI that can play a single game - or games in general. 7
    21. 21. Why? • There’s little scientific value of making AI that can play a single game - or games in general. • However, the ability to adapt to new scenarios, to reason about the behaviour of other players and achieve an overall objective is hugely important. 7
    22. 22. Why? • There’s little scientific value of making AI that can play a single game - or games in general. • However, the ability to adapt to new scenarios, to reason about the behaviour of other players and achieve an overall objective is hugely important. • AAAI offers an annual GGP competition 7
    23. 23. Describing Games 8
    24. 24. Describing Games • Games are described by capturing their characteristics 8
    25. 25. Describing Games • Games are described by capturing their characteristics • Number of players (and their roles) 8
    26. 26. Describing Games • Games are described by capturing their characteristics • Number of players (and their roles) • Actions that can be taken, how they affect the world and when they can be taken 8
    27. 27. Describing Games • Games are described by capturing their characteristics • Number of players (and their roles) • Actions that can be taken, how they affect the world and when they can be taken • The goal of the game for each player and the score they get for that end-state 8
    28. 28. GDL (ROLE XPLAYER) (ROLE OPLAYER) (INIT (CELL 1 1 B)) (INIT (CELL 1 2 B)) (INIT (CELL 1 3 B)) ...... (<= (NEXT (CELL ?M ?N X)) (DOES XPLAYER (MARK ?M ?N)) (TRUE (CELL ?M ?N B))) (<= (NEXT (CELL ?M ?N B)) (DOES ?W (MARK ?J ?K)) (TRUE (CELL ?M ?N B)) (OR (DISTINCT ?M ?J) (DISTINCT ?N ?K)) (<= (ROW ?M ?X) (TRUE (CELL ?M 1 ?X)) (TRUE (CELL ?M 2 ?X)) (TRUE (CELL ?M 3 ?X))) (<= (LINE ?X) (ROW ?M ?X)) (<= (LEGAL ?W (MARK ?X ?Y)) (TRUE (CELL ?X ?Y B)) (TRUE (CONTROL ?W))) (<= (LEGAL XPLAYER NOOP) (TRUE (CONTROL OPLAYER))) (<= (GOAL XPLAYER 100) (LINE X)) (<= (GOAL OPLAYER 0) (LINE X)) (<= (GOAL OPLAYER 50) (NOT (LINE X)) (NOT (LINE O)) (NOT OPEN)) 9
    29. 29. Advanced GDL 10
    30. 30. Advanced GDL • Control - The GDL spec forces both players to move concurrently. A control predicate can be used to force a turn-based approach, by only allowing one player to make an important move at one time. 10
    31. 31. Advanced GDL • Control - The GDL spec forces both players to move concurrently. A control predicate can be used to force a turn-based approach, by only allowing one player to make an important move at one time. • Turn counter - GDL does not allow for fluents. The only way a counter can work is to activate a sequence of predicates. 10
    32. 32. GDL vs PDDL 11
    33. 33. GDL vs PDDL • GDL has many concepts in common with PDDL 11
    34. 34. GDL vs PDDL • GDL has many concepts in common with PDDL • But its pretty primitive by comparison. 11
    35. 35. GDL vs PDDL • GDL has many concepts in common with PDDL • But its pretty primitive by comparison. • In particular, Frame Axioms are handled INCREDIBLY badly. 11
    36. 36. GDL vs PDDL • GDL has many concepts in common with PDDL • But its pretty primitive by comparison. • In particular, Frame Axioms are handled INCREDIBLY badly. • In a new state, the only things that are true are those explicitly made true by the actions taken. 11
    37. 37. Extensions to GDL • GDL describes simplistic games. • Much richer language required to represent many games. • World Description Language is an extended version of GDL to include modules such as random chance as importable libraries. 12
    38. 38. Flow of a Game • Games require a Game Master to control them. • GM connects to each player in turn, gives them the GDL definition and the time parameters • GM then connects to each player in turn, gives them the moves made the previous turn and receives that player’s move. 13
    39. 39. Supporting Systems 14
    40. 40. Supporting Systems • Need to have a Game Master system to control execution 14
    41. 41. Supporting Systems • Need to have a Game Master system to control execution • Need to be able to parse a GDL definition into something that can be manipulated inside a program 14
    42. 42. Supporting Systems • Need to have a Game Master system to control execution • Need to be able to parse a GDL definition into something that can be manipulated inside a program • And of course, also need agents 14
    43. 43. GG Players • Players communicate using TCP/IP • Given a fixed amount of time between being given the definition and being asked for the first move. • Each move request must be answered within a limited time - typically around 5s to pick the next move to be made and answer the GM. 15
    44. 44. Game Heuristics • The biggest problem with these types of games is that there’s no general way of analysing a given state for how “good” it is without trying to evaluate the full space. • This means that choosing an action at a particular state is tough. 16
    45. 45. Another Planning Slide • Domain independent heuristics are something we deal with on a daily basis in the planning side of AI • Are our techniques applicable in some way? 17
    46. 46. RPG Applied to GGP 18
    47. 47. RPG Applied to GGP • The Relaxed Plan Graph is a simplistic version of the world 18
    48. 48. RPG Applied to GGP • The Relaxed Plan Graph is a simplistic version of the world • Things that have become true are always true, there are no negative effects to actions 18
    49. 49. RPG Applied to GGP • The Relaxed Plan Graph is a simplistic version of the world • Things that have become true are always true, there are no negative effects to actions • How can this be applied to GDL? 18
    50. 50. RPG Applied to GGP 18
    51. 51. RPG Applied to GGP It can’t 19
    52. 52. RPG - What Happens? • Tic Tac Toe example : facts 1 - (cell 1 1 B) actions 1 -(mark 1 1 xplayer) facts 2 - (cell 1 1 B) (cell 1 1 X) • In planning this kind of retention of old factoids is not a major issue. How problematic is it in GDL? 20
    53. 53. Unrealistic Wins • Tic Tac Toe - Turn 5 under the RPG Facts 5 : (cell 1 1 B) (cell 1 2 B).... (cell 1 1 x) (cell 1 2 x) (cell 1 3 o) (cell 2 3 o) Action 5 : (mark 1 3 x) • RPG has given a false victory to x 21
    54. 54. More RPG in GDL • Consider another aspect of the Tic Tac Toe game: facts 1 - (cell 1 1 B) (control xplayer) actions 1 -(mark 1 1 xplayer) facts 2 - (cell 1 1 B) (cell 1 1 X) (control xplayer) (control oplayer) 22
    55. 55. Heuristics • RPG is one of our best heuristics and it is far too disruptive and uninformative to apply directly to GDL - we rely much more heavily on the delete effects of actions. • Not to say all our heuristics will fail, or that RPG can’t be adapted to maintain the concept somehow but work more effectively. 23
    56. 56. MiniMax Player • MiniMax is a game theoretic technique that assumes that the opponent is actively conspiring against the player - paranoia. • At each decision point the opponent has, it will attempt to minimise our expected payoff. • The player must then find the move that maximises this minimal payoff. 24
    57. 57. FluxPlayer • Winner of AAAI GGP competition 2006 • Uses Fluent Calculus to determine effects of actions in a more generalised manner • Fuzzy Logic used to create an evaluation of how closely a state matches a described goal state • Structure determination in the GDL 25
    58. 58. CADIAPlayer • Won AAAI GGP Competition ’07 and ’08 • Created by Finnsson and Björnsson • UCT / Monte Carlo approach • Simulated probing to establish likely outcomes of different actions • Sampling biased towards better seeming states to more fully explore these areas 26
    59. 59. Future • Subject of an abandoned 4th Year project. • Investigating portfolio approaches and game classification by feature extraction. • Planned to resume next year. • General Games will be run as part of 3rd Year Foundations of Artificial Intelligence coursework. 27

    ×