Top Banner
1 General Game Playing Introduction Computer Game Playing
38

Computer Game Playing - TUD - Faculty of Computer Science

Sep 12, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Computer Game Playing - TUD - Faculty of Computer Science

1General Game Playing Introduction

Computer Game Playing

Page 2: Computer Game Playing - TUD - Faculty of Computer Science

2General Game Playing Introduction

General Game Playing

General Game Players are systemsable to accept a formal description of arbitrary gamesable to use such descriptions to play the games effectively

Cognitive Information Processing Technologiesknowledge representationreasoninglearningrational behavior

Unlike specialized game players (e.g. Deep Blue), they do not use algorithms designed in advance for specific games.

Page 3: Computer Game Playing - TUD - Faculty of Computer Science

3General Game Playing Introduction

Tic-Tac-Toe

Page 4: Computer Game Playing - TUD - Faculty of Computer Science

4General Game Playing Introduction

Chess

Page 5: Computer Game Playing - TUD - Faculty of Computer Science

5General Game Playing Introduction

Kriegspiel

Page 6: Computer Game Playing - TUD - Faculty of Computer Science

6General Game Playing Introduction

Bughouse Chess

Page 7: Computer Game Playing - TUD - Faculty of Computer Science

7General Game Playing Introduction

Towers of Hanoi

Page 8: Computer Game Playing - TUD - Faculty of Computer Science

8General Game Playing Introduction

Maze World

Page 9: Computer Game Playing - TUD - Faculty of Computer Science

9General Game Playing Introduction

Monopoly

Page 10: Computer Game Playing - TUD - Faculty of Computer Science

10General Game Playing Introduction

International Activities

Website – http://games.stanford.eduGamesGame ManagerReference Players

Annual CompetitionPittsburgh 2005Boston 2006

Page 11: Computer Game Playing - TUD - Faculty of Computer Science

11General Game Playing Introduction

Finite Synchronous Games

Finite environmentEnvironment with finitely many statesOne initial state and one or more terminal states

Finite PlayersFixed finite number of playersEach with finitely many “actions”Each with one or more goal states

Synchronous UpdateAll players move on all steps (some no-ops)Environment changes only in response to moves

Page 12: Computer Game Playing - TUD - Faculty of Computer Science

12General Game Playing Introduction

Games as State Machines

Page 13: Computer Game Playing - TUD - Faculty of Computer Science

13General Game Playing Introduction

Initial State and Terminal States

Page 14: Computer Game Playing - TUD - Faculty of Computer Science

14General Game Playing Introduction

Goal States

Page 15: Computer Game Playing - TUD - Faculty of Computer Science

15General Game Playing Introduction

Simultaneous Actions

Page 16: Computer Game Playing - TUD - Faculty of Computer Science

16General Game Playing Introduction

Correct Game Descriptions

In a correct game descriptionEach player has a legal move in every non-terminal stateEvery terminal state is a goal state: a goal value is specifiedfor each player

Page 17: Computer Game Playing - TUD - Faculty of Computer Science

17General Game Playing Introduction

Encoding Alternatives

State Machines. Astronomically large state spaces, e.g. ~ 5000 states in Tic-Tac-Toe, ~1030 states in Chess.

Lists and Tables. Still the same size. Just switching to database states does not decrease the size of direct representation.

Programs. One possibility is to write a program to generate legal moves and successor states and to evaluate goals and termination. However, which language? Java, Lisp, C? What if a player wants to reason about the structure of a game in general? This is difficult if the game is encoded in procedural form.

Logic. There are existing interpreters / compilers. Logic is easier to use for analysis than procedural encodings.

Page 18: Computer Game Playing - TUD - Faculty of Computer Science

18General Game Playing Introduction

Formal Game Descriptions

Whatever form is used, the description must give all information necessary to determine legality of moves, state transition, termination, and goals.

Nothing is assumed except for logic.No arithmeticsNo physicsNo common sense

(To emphasize this, game descriptions can be written in terms of nonsense symbols.)

Page 19: Computer Game Playing - TUD - Faculty of Computer Science

19General Game Playing Introduction

Logical Reasoning

Minimal CapabilitiesComputing legality of movesComputing consequences of actionsKnowing when a goal is achievedKnowing when a game is over

Other Potential UsesSimplificationOptimizationGame Theory

Page 20: Computer Game Playing - TUD - Faculty of Computer Science

20General Game Playing Introduction

Simple Games

Simple GamesSingle PlayerModerate state space

ExamplesTowers of HanoiBlocks WorldButtons and Light

ApproachPlanning

Page 21: Computer Game Playing - TUD - Faculty of Computer Science

21General Game Playing Introduction

Indeterminacy

Page 22: Computer Game Playing - TUD - Faculty of Computer Science

22General Game Playing Introduction

Dealing with Indeterminacy

Coercive Sequential Plans

Conditional Plans

Interleaved Planning and Execution~> Trial-and-error

(reversibility desirable)

Page 23: Computer Game Playing - TUD - Faculty of Computer Science

23General Game Playing Introduction

Dealing with Size

Partial SearchMinimaxEvaluation function for non-terminal states

Reformulation~> Solve abstract problem~> Refine abstract solution to complete solution

Page 24: Computer Game Playing - TUD - Faculty of Computer Science

24General Game Playing Introduction

Learning

Performance improvement during a matchRecognizing futile actions/strategiesModeling other players

Performance improvement over multiple matches~> Must recognize that it is the same game

Performance improvement over gamesLemmasConcepts (e.g. “pinned pieces”)

Page 25: Computer Game Playing - TUD - Faculty of Computer Science

25General Game Playing Introduction

Infrastructure

Parameterized collection of GamesComplete informationOne player or n playersCompetition and cooperation

ServicesSample players (including human interface)Game definition supportGame Manager

RecordsPlayersPerformance data

Page 26: Computer Game Playing - TUD - Faculty of Computer Science

26General Game Playing Introduction

Game Manager

Page 27: Computer Game Playing - TUD - Faculty of Computer Science

27General Game Playing Introduction

Game Playing Protocol

StartManager sends Start message to playersStart(match,role,description,startclock,playclock)

PlayManager sends Play messages to playersPlay(match,actions)Receives plays in response

StopManager sends Stop message to playersStop(match,actions)

Page 28: Computer Game Playing - TUD - Faculty of Computer Science

28General Game Playing Introduction

Misplay

Player errsIllegal moveNo move before clock runs out

~> Manager selects a random legal move

Page 29: Computer Game Playing - TUD - Faculty of Computer Science

29General Game Playing Introduction

Variety of Games

Number of playersSingle player, e.g. Towers of Hanoi, 15-Puzzle, Maze World2-player competitive games, e.g. Tic-Tac-Toe, Chessn-player games with allies and enemies, e.g. Monopoly

InformationIncomplete, e.g. Maze World, MonopolyComplete, e.g. Chess

ScaleExhaustively searchable, e.g. Tic-Tac-ToeNot exhaustively searchable, e.g. Chess

Page 30: Computer Game Playing - TUD - Faculty of Computer Science

30General Game Playing Introduction

Game Theory

Like General Game Theory, traditional Game Theory isconcerned with games in general.

In traditional Game Theory, the game tree is known to thegame programmer in advance.

In General Game Theory, the game “tree” is communicatedat runtime. Hence there is an emphasis on finite descriptionand use of this description.

Page 31: Computer Game Playing - TUD - Faculty of Computer Science

31General Game Playing Introduction

Automatic Programming

The goal of automatic programming is theautomatic generation of programs that achieveformally stated specifications. Ditto for GGP.

Page 32: Computer Game Playing - TUD - Faculty of Computer Science

32General Game Playing Introduction

Critique

The main downside of general game playing isthe possible criticism of game playing as being afrivolous pursuit.

Sample Application: Enterprise Management Behavior:Laws, Business Rules, Contracts Planning under Behavioral ConstraintsMonitoring and Conformance TestingBusiness Process MediationAutomated Legislation

Page 33: Computer Game Playing - TUD - Faculty of Computer Science

33General Game Playing Introduction

Critique

Human Intelligence is arguably the product ofeons 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.

A key indicator of intelligence is the ability to function in radically new environments.

Page 34: Computer Game Playing - TUD - Faculty of Computer Science

34General Game Playing Introduction

Critique

Real intelligence requires the ability to figure out new environments.

Well, 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.

Page 35: Computer Game Playing - TUD - Faculty of Computer Science

35General Game Playing Introduction

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.

Page 36: Computer Game Playing - TUD - Faculty of Computer Science

36General Game Playing Introduction

Ed Feigenbaum

The potential use of computers by people to accomplish tasks canbe “one-dimensionalized” into a spectrum representing the natureof the instruction that must be given the computer to do its job. Callit the what-to-how spectrum. At one extreme of the spectrum, the user supplies his intelligence to instruct the machine with precision exactlyhow 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 hewants done [...] without having to lay out in detail all necessary subgoalsfor adequate performance.

Page 37: Computer Game Playing - TUD - Faculty of Computer Science

37General Game Playing Introduction

Robert Heinlein

A human being should be able to change a diaper,plan an invasion, butcher a hog, conn a ship, designa building, write a sonnet, balance accounts, build awall, 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.

Page 38: Computer Game Playing - TUD - Faculty of Computer Science

38General Game Playing Introduction

Schedule

Thursday, October 12th, 2006 Introduction19th, Game Description Language26th, Automated Reasoning

November 2nd, State-Space Search and Planning 9th, Incomplete Information16th, Game Theory

Beginning of summer term 2007 Final Contest