Presentation is loading. Please wait.

Presentation is loading. Please wait.

Subject today is General Game Playing, a new variation on an old topic in Artificial Intelligence. Playing games like chess couples intellectual activity.

Similar presentations


Presentation on theme: "Subject today is General Game Playing, a new variation on an old topic in Artificial Intelligence. Playing games like chess couples intellectual activity."— Presentation transcript:

1 Subject today is General Game Playing, a new variation on an old topic in Artificial Intelligence.
Playing games like chess couples intellectual activity with competition. By playing games, we can exercise and improve our intellectual skills. The competition adds excitement and allows us to compare our skills to those of others. The same motivation accounts for interest in Computer Game Playing as a testbed for Artificial Intelligence. Programs that think better should be able to win more games, and so we can use competitions as an evaluation technique for intelligent systems. Unfortunately, building programs to play specific games has limited value in AI. (1) To begin with, specialized game players are very narrow. They can be good at one thing but not another. Deep Blue may have beaten the world chess champion, but it has no clue how to play checkers; it cannot even balance a checkbook. (2) A second problem with specialized game playing systems is that they do only part of the work. Most of the interesting analysis and design is done in advance by their programmers. The systems themselves might as well be tele-operated.

2 Game Playing Human Game Playing Intellectual Activity Skill Comparison
Computer Game Playing Testbed for AI Limitations Playing games like chess couples intellectual activity with competition. By playing games, we can exercise and improve our intellectual skills. The competition adds excitement and allows us to compare our skills to those of others. The same motivation accounts for interest in Computer Game Playing as a testbed for Artificial Intelligence. Programs that think better should be able to win more games, and so we can use competitions as an evaluation technique for intelligent systems. Unfortunately, building programs to play specific games has limited value in AI. (1) To begin with, specialized game players are very narrow. They can be good at one thing but not another. Deep Blue may have beaten the world chess champion, but it has no clue how to play checkers; it cannot even balance a checkbook. (2) A second problem with specialized game playing systems is that they do only part of the work. Most of the interesting analysis and design is done in advance by their programmers. The systems themselves might as well be tele-operated.

3 General Game Playing General Game Players are systems able to play arbitrary games effectively based solely on formal descriptions supplied at “runtime”. Translation: They don’t know the rules until the game starts. Additional Complexities: uncertainty (moves of other players) resource bounds (game clock) All is not lost. We believe that the idea of game playing can be used to good effect to inspire and evaluate good work inArtificial Intelligence, but it requires moving more of the mental work to the computer itself. This can be done by focussing attention on General Game Playing. General game players are systems able to play arbitrary games based solely on formal game descriptions supplied at "runtime". In a typical general game playing episode, the players know nothing about the game in advance. Once the game begins, they receive a game description; and, based solely on that description, they must figure out how to play the game legally and effectively. Furthermore, they must deal with uncertainty (about the actions of the other players) and resource bounds (in the form of a game clock that limits their computation time).

4 Technology Unlike specialized game players (e.g. Deep Blue), they do not use algorithms designed in advance for specific games. Artificial Intelligence Technologies knowledge representation reasoning, reformulation, learning rational behavior w/ uncertainty, resource bounds Unlike specialized game players, such as Deep Blue, general game players cannot rely on algorithms designed in advance for specific games. General game playing expertise must depend on intelligence on the part of the game player and not just intelligence of the programmer of the game player. In order to perform well, general game players must incorporate multiple Artificial Intelligence technologies, such as knowledge representation, reasoning, learning, and rational decision making.

5 Knight-Zone Chess

6 Bughouse Chess

7 Competitive Games

8 Single Player “Games” a c b

9 Versatility Unlike specialized game players, general game players must able to play different kinds of games. They should be able to play simple games (like Tic-Tac-Toe) and complex games (like Chess). Games with simultaneous play (like Diplomacy) and games with alternating play like Risk). Zero-sum games and cooperative games. Games with complete information or games with incomplete information (e.g. Battleship). Games with varying numbers of players (Blocks World, Chess, Chinese Checkers). Games with simultaneous play (e.g. Diplomacy) or alternating play. Games with or without communication among the players (e.g. Bughouse Chess). Games do not even need to be zero-sum; cooperative games are as good as competitive games.

10 Annual AAAI GGP Competition
Annual AAAI Competition Held at AAAI conference Administered by Stanford (Stanford folks not eligible to participate) Reward winner Jim Clune of UCLA Stephan Schiffel and Michael Thielscher Yngve Bjornsson and Hilmar Finsson Yngve Bjornsson and Hilmar Finsson

11 Other Games, Other Winners
The contests were exciting, and some of the spectators even got in on the action. I don’t want to toot my own horn here, but let me just say that last year I came away somewhat wealthier than I expected, at Chris Welty’s expense.

12 Carbon versus Silicon Something new this year will be a battle between Carbon and Silicon. We will let let the humans select an opponent to play against the world champion and see what happens.

13 General Game Description
Let me start with some remarks on what I mean when I talk about games and how one describes games for GGPs to play.

14 Single Player Game as a State Machine
b s2 s5 s8 a a b a a b d b d s1 s3 s6 s9 b s11 a a c a c b b s7 a s4 s10 In General Game Playing, we consider finite, synchronous games. These games take place in an environment with finitely many states, with one distinguished initial state and one or more terminal states. In addition, each game has a fixed, finite number of players; each player has finitely many possible actions in any game state, and each terminal state has an associated goal value for each player. The dynamic model for general games is synchronous update: all players move on all steps (although some moves could be “no-ops”), and the environment updates only in response to the moves taken by the players. In its most abstract form, we can think of a finite, synchronous game as a state machine. Since all of the games that we are considering are finite, it is possible, in principle, to describe such games in the form of lists (of states and actions) and tables (to express legality, goals, temination, and update). Unfortunately, such explicit representations are not practical in all cases. Even though the numbers of states and actions are finite, they can be extremely large; and the tables relating them can be larger still. For example, in Chess, there are thousands of possible moves and approximately 10^30 states.

15 Composite Actions for Multiple Players
aa ab s2 s5 s8 aa bb ab aa aa ab bb ab ab ba s1 s3 s6 s9 s11 aa ab ba ba bb bb aa aa s4 s7 s10

16 Direct Description Since all of the games that we are considering are finite, it is possible in principle to communicate game information in the form of transition graphs. Problem:Size of description. Even though everything is finite, the graphs can be large. Ideas: 1. Different Conceptualization 2. Compact Encoding Chess, for example, has approximately 1030 states.

17 Tic-Tac-Toe init(cell(1,1,b)) init(cell(1,2,b)) init(cell(1,3,b))
init(control(x)) legal(P,mark(X,Y)) :- true(cell(X,Y,b)) & true(control(P)) legal(x,noop) :- true(control(o)) legal(o,noop) :- true(control(x)) next(cell(M,N,P)) :- does(P,mark(M,N)) next(cell(M,N,Z)) :- does(P,mark(M,N)) & true(cell(M,N,Z)) & Z#b next(cell(M,N,b)) :- does(P,mark(J,K)) & true(cell(M,N,b)) & (M#J | N#K) next(control(x)) :- true(control(o)) next(control(o)) :- true(control(x)) terminal :- line(P) terminal :- ~open goal(x,100) :- line(x) goal(x,50) :- draw goal(x,0) :- line(o) goal(o,100) :- line(o) goal(o,50) :- draw goal(o,0) :- line(x) row(M,P) :- true(cell(M,1,P)) & true(cell(M,2,P)) & true(cell(M,3,P)) column(N,P) :- true(cell(1,N,P)) & true(cell(2,N,P)) & true(cell(3,N,P)) diagonal(P) :- true(cell(1,1,P)) & true(cell(2,2,P)) & true(cell(3,3,P)) true(cell(1,3,P)) & true(cell(3,1,P)) line(P) :- row(M,P) line(P) :- column(N,P) line(P) :- diagonal(P) open :- true(cell(M,N,b)) draw :- ~line(x) & ~line(o) Given this structure for states, it is possible to encode games in a form that is more compact than direct representation by writing rules as axioms in computable a subset of first-order logic called GDL. Here we have the entire axiomatization for Tic-Tac-Toe. The rules for Chess take about 5 pages in this font. Smaller than the game tree of nodes.

18 No Built-in Assumptions
What we see: next(cell(M,N,x)) :- does(white,mark(M,N)) & true(cell(M,N,b)) What the player sees: next(welcoul(M,N,himenoing)) :- does(himenoing,dukepse(M,N)) & true(welcoul(M,N,lorenchise))

19 Game Manager . . . Graphics for Spectators Game Descriptions
Match Records Temporary State Data Player Graphics for Spectators . . . Tcp/ip

20 Game Playing Protocol Start Manager sends Start message to players
Start(id,role,description,startclock,playclock) Play Manager sends Play messages to players Play(id, actions) Receives plays in response Stop Manager sends Stop message to players Stop(id, actions)

21 General Game Playing

22 Logic Possible to use logical reasoning for everything
Computing legality of moves Computing consequences of actions Computing goal achievement Computing termination Easy to convert from logic to other representations Simplicity of logical formulation Simple, widely published algorithms 3-4 orders or magnitude speedup no asymptotic change

23 State Representation X O cell(1,1,x) cell(1,2,b) cell(1,3,b)
cell(2,2,o) cell(2,3,b) cell(3,1,b) cell(3,2,b) cell(3,3,x) control(black) X O

24 Legality Computation Conclusions: legal(W,mark(X,Y)) :- cell(1,1,x)
true(cell(X,Y,b))  cell(1,2,b) true(control(W)) cell(1,3,b) cell(2,1,b) legal(white,noop) :- cell(2,2,o) true(cell(X,Y,b))  cell(2,3,b) true(control(black)) cell(3,1,b) cell(3,2,b) legal(black,noop) :- cell(3,3,x) true(cell(X,Y,b))  control(black) true(control(white)) Conclusions: legal(white,noop) legal(black,mark(1,2)) legal(black,mark(3,2))

25 Update Computation cell(1,1,x) cell(1,1,x) cell(1,2,b) cell(1,2,b)
cell(1,3,b) cell(1,3,o) cell(2,1,b) black cell(2,1,b) cell(2,2,o) cell(2,2,o) cell(2,3,b) mark(1,3) cell(2,3,b) cell(3,1,b) cell(3,1,b) cell(3,2,b) cell(3,2,b) cell(3,3,x) cell(3,3,x) control(black) control(white) next(cell(M,N,o)) :- does(black,mark(M,N)) & true(cell(M,N,b))

26 Game Tree Expansion X O X O X O X O

27 Game Tree Search X O X O X O X O
From these bits of information, it can build a game tree. The traditional approach to game-playing is game-tree expansion and the use of techniques such as minimax to determine the best possible move. Unfortunately, it is not always possible to search to the end of the game tree. In Tic-Tac-Toe, there are a thousands of states. This is large but manageable. In Chess there are approximately 10^30 states. A state space of this size, being finite, is fully searchable in principle but not in practice. Moreover, the time limit on moves in most games means that players must select actions without knowing with certainty whether they are the best or even good moves to make. X O

28 Resource Limitations Large state spaces ~5000 states in Tic-Tac-Toe
~1044 states in Chess Limited Resources Memory Time (start clock, move clock) Even in cases where there is a solution, the graph may be so large as to make it practically impossible for any player to fins the solution.

29 But how do we evaluate non-terminal states?
Incremental Search Incremental Search Expand Game Graph incrementally As much as time allows Minimax/etc. evaluation on non-terminal states using an evaluation function of some sort But how do we evaluate non-terminal states? In traditional game playing, the rules are known in advance, and the programmer can invent an evaluation function. Not possible with GGP.

30 Non-Guaranteed Evaluation Functions
Ideas Goal proximity (everyone) Maximize mobility (Barney Pell) Minimize opponent’s mobility (Jim Clune) Depth Charge (random probe) <insert your good idea here>

31 AAAI-06 Final - Cylinder Checkers
The final match was a round of cylinder checkers, I.e. checkers played on a cylinder. After some intriguing and befuddling play by both players, one of the two emerged as the clear victor. This is the final position at the end of the game.

32 Metagaming

33 Automatic Programming
Problem Specification in the form of game rules Output is a program to play the game effectively Features: Side Effects Uncertainty (other players’ actions) Resource Bounds (playclock) Ideas: Compilation Guaranteed Evaluation Functions Reformulation

34 Guaranteed Evaluation Functions
Ideas * Novelty with reversibility * Goal-monotonic observables * Bad states, useless moves <insert your good idea here>

35 Hodgepodge Hodgepodge = Chess + Othello Analysis of joint game:
Branching factor: a Branching factor: b Analysis of joint game: Branching factor as given to players: a*b Fringe of tree at depth n as given: (a*b)n Fringe of tree at depth n factored: an+bn

36 Double Tic-Tac-Toe X O X O

37 Game Reformulation Examples Symmetry, e.g. Tic-Tac-Toe
Independence, e.g Hodgepodge Bottlenecks, e.g. Triathalon Techniques: Graph Analysis (factoring, branching factor, …) Proofs (esp those using mathematical induction) Trade-off - cost of finding structure vs savings Sometimes cost varies with size of description rather than size of expanded game graph Use of startclock versus playclock

38 Delayed Gratification
X O

39 Conclusion

40 General Game Playing is not a game
Critique: Game playing is frivolous. Reply: General game playing is serious business. AI: general problem solving with multiple agents DB: Update through views with dynamic constraints and long-running transactions Systems: Automatic Programming redux Motivating Applications: Enterprise Management, Computational Law Funding by Darpa, SAP, etc. Bear on and draw from

41 Tabula Rasa Critique: Human Intelligence is arguably the product of eons of evolution. We are, to some extent at least, “wired” to function well in this world. General Game Players have nothing at their disposal but mathematics. Reply 1: A key indicator of intelligence is the ability of an individual to function in radically new environments. Reply 2: A track of the competition in which the job is to figure out the rules.

42 Using What We Learn Critique: Real intelligence requires the ability to figure out new environments. Reply: Well, there is no question that that ability is essential. However, real intelligence also requires the ability to use theories once they are formed. This is the domain of specification-based systems / declarative systems / and so forth; and interest in this problem dates to the beginning of the field.

43 John McCarthy The main advantage we expect the advice taker to have is that its behavior will be improvable merely by making statements to it, telling it about its … environment and what is wanted from it. To make these statements will require little, if any, knowledge of the program or the previous knowledge of the advice taker. This is in the tradition of ai. It was in 1958 that John McCarthy invented the concept of the "advice taker". The idea was simple. He wanted a machine that he could program by description. He would describe the intended environment and the desired goal, and the machine would use that information in determining its behavior. There would be no programming in the traditional sense. McCarthy presented his concept in a paper that has become a classic in the field of AI.

44 Ed Feigenbaum The potential use of computers by people to accomplish tasks can be “one-dimensionalized” into a spectrum representing the nature of the instruction that must be given the computer to do its job. Call it the what-to-how spectrum. At one extreme of the spectrum, the user supplies his intelligence to instruct the machine with precision exactly how to do his job step-by-step At the other end of the spectrum is the user with his real problem He aspires to communicate what he wants done ... without having to lay out in detail all necessary subgoals for adequate performance. An ambitious goal! But that was a time of high hopes and grand ambitions. The idea caught the imaginations of numerous subsequent researchers -- notably Bob Kowalski, the high priest of logic programming, and Ed Feigenbaum, the inventor of knowledge engineering. In a paper written in 1974, Feigenbaum gave his most forceful statement of McCarthy's ideal.

45 Robert Heinlein computer/robot
v A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

46


Download ppt "Subject today is General Game Playing, a new variation on an old topic in Artificial Intelligence. Playing games like chess couples intellectual activity."

Similar presentations


Ads by Google