An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

50
An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow

Transcript of An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Page 1: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

An Introduction to RoboCup

February 24, 2004

by Kevin LamPortions by Paul Marlow

Page 2: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Agenda

Overview of RoboCup

Demonstration Game

Simulator Mechanics

Simulator Communications Protocol

Some Existing Clients

Other Developments/Tools

Page 3: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Overview of RoboCup

The Robot World Cup Initiative

“By the year 2050, develop a team of fully autonomous humanoid robots that can win against the human world soccer champion team.”

A standard problem for AI research

Page 4: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Overview of RoboCup

Started in 1992 as the Robot J-League (Japan)

First games and conferences in 1997

Workshops, conferences and yearly competitions

Page 5: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup Leagues

four-legged

small size

middle size

simulation

Page 6: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

World Championships

RoboCup 2004 - Lisbon

RoboCup 2003 - Padua

RoboCup 2002 - Fukuoka/Busan

RoboCup 2001 - Seattle

RoboCup 2000 - Melbourne

RoboCup 1999 - Stockholm

RoboCup 1998 - Paris

RoboCup 1997 - Nagoya

Page 7: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup Simulator

simulation

Server

Monitor clients

Player clients (i.e. agents!)

Coach clients

Page 8: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Demonstration

QuickTime™ and aMPEG-4 Video decompressor

are needed to see this picture.

Page 9: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Simulator Mechanics

Page 10: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Clients and Server

ClientClientClientClientClientClient

ClientClientClientClientClientClientServer

One server

Up to 11 clients per team (plus coach)

Clients/server communicate via UDP/IP

Page 11: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Can be written in any language (C++, Java, Smalltalk, ...)

Can be run on same machine or a network

Clients may talk only to the server... not to each other!

ClientClientClientClientClientClient

ClientClientClientClientClientClientServer

Page 12: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

ClientClientClientClientClientClient

ClientClientClientClientClientClientServer

Soccer MonitorCoach Coach

Monitor(s) used to visualize the action and/or interrupt the game

Coaches (optional) to give guidance to teams

Page 13: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup ClientsAutonomous agents

The “brains” of the players

Sensory information received from server, decision made, action command sent back to server

One agent represents one player

One agent designates itself as the goalie

Page 14: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup Clients

Player Agent

timeplay modemy body

landmarksother players

speechcoach

instructions

dashturn

turn headkick

catchspeak

decision-makingstrategy

Sensory Input Outputs

Page 15: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup ServerKeeps time (typically 6000 simulator cycles, 10 cycles per second)

Receives client messages, updates “world model”, sends back new status information

“Automated Referee” tracks current play mode

Page 16: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Play Modes

kick off

game on

goals

out of field

offsides

half time and game over

Page 17: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Starting a GameDownload and install applications (running the configure and make scripts for the Unix / Linux systems)Run the Server (default host is localhost and default port is 6000)Run the Monitor, connecting to the host and port of the ServerConnect the players to the Server host and portStart the kick-off!

Page 18: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Communications Protocol

Page 19: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Connection Protocols

• From client to server:

– (init TeamName [(version VerNum)] [(goalie)])

– (reconnect TeamName Unum)

– (bye)

• From server to client:

– (init Side Unum PlayMode) as a response for both client init and reconnect messages

• Side = l | r; Unum = 1 ~ 11

Page 20: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

An Example•send 6000 : (init MyTeam)

•recv 1067 : (init l 1 before_kick_off)

•recv 1067 : (see 0 ((goal r) 66.7 33) ((flag r t) 2 55.73)((flag p r t) 42.5 23) ((flag p r c) 53.5 43))

•recv 1067 : (see 0 ((goal r) 66.7 33) ((flag r t) 55.7 3) ((flag p r t) 42.5 23) ((flag p r c) 53.5 43))

•send 1067 : (move 0 0)

Page 21: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Client CommandsClient Command Once per Cycle

(catch Direction) Yes

(change_view Width Quality) No

(dash Power) Yes

(kick Power Direction) Yes

(move X Y) Yes

(say Message) No

(sense_body) No

(score) No

(turn Moment) Yes

(turn_neck Angle) Yes

Page 22: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Client Sensor Protocol

Three main message types:

Hear

See

Sense_Body

Noise models for each

Page 23: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Hear Messages

Can hear one message per team per cycle

(hear Time Sender “Message”)

–Sender = online_coach_left/right, referee, self, Direction

–Direction = -180 – 180 degrees

Page 24: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Hear Example

•(hear 18 self FCPortugal ETV 18 world_status r 2 0.98 -10.95 16.64 1 0.95 •0.00 0.00 1 0.95 0.00 0.00 3 0 OtGL- - fGXtZ 3F.- /sdhAl 1p.- 0 40.0 0.0 0 2 )

Page 25: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

See Messages(see Time ObjInfo)

–ObjInfo:

•(ObjName Distance Direction DistChange DirChange BodyFacingDir HeadFacingDir) or

•(ObjName Distance Direction DistChange DirChange) or

•(ObjName Distance Direction) or

•(ObjName Direction)

Page 26: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

See MessagesObjName:– (p [TeamName [UniformNum [goalie]]]) or

– (b) or

– (g [l|r]) or

– (f c); (f [l|c|r] [t|b]); (f p [l|r] [t|c|b]);

• (f g [l|r] [t|b]); (f [l|r|t|b] 0);

• (f [t|b] [l|r] [10|20|30|40|50]);

• (f [l|r] [t|b] [10|20|30]);

– (l [l|r|t|b])

– (B); (F); (G); (P)

Page 27: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Flags and Lines

Page 28: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

See Example

•(see 18 ((f r t) 44.7 -22) ((f g r b) 47.9 30) ((f g r t) 42.5 13) ((f p r c) 30.3 34 -0 0) ((f p r t) 25.3 -7 0 0) ((f t r 40) 36.2 -37) ((f t r 50) 44.7 -29) ((f r 0) 49.4 20) ((f r t 10) 47 8) ((f r t 20) 46.5 -3) ((f r t 30) 48.4 -15) ((f r b 10) 53.5 30) ((f r b 20) 59.1 38) ((f r t) 44.7 -22) ((f g r b) 47.9 30) ((g r) 44.7 22) ((f g r t) 42.5 13) ((f p r c) 30.3 34) ((f p r t) 25.3 -7 0 0) ((f t r 40) 36.2 -37) ((f t r 50) 44.7 -29) ((f r 0) 49.4 20) ((f r t 10) 47 8) ((f r t 20) 46.5 -3) ((f r t 30) 48.4 -15) ((f r b 10) 53.5 30) ((f r b 20) 59.1 38) ((p "FCPortugal") 36.6 28) ((l r) 41.7 -89))

Page 29: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Sense_Body Messages

• (sense_body Time • (view_mode {high | low} {narrow | normal |

wide})• (stamina StaminaEffort)• (speed AmountOfSpeed DirectionOfSpeed)• (head_angle HeadAngle)• (kick KickCount)• (dash DashCount)• (turn TurnCount)• (say SayCount)• (turn_neck TurnNeckCount)• (catch CatchCount)• (move MoveCount)• (change_view ChangeViewCount))

Page 30: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Sense_Body Example

•(sense_body 19 (view_mode high normal) (stamina 4000 1) (speed 0 0) (head_angle 0) (kick 0) (dash 0) (turn 0) (say 98) (turn_neck 0))

Page 31: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

CoachesPrivileged clients used to provide assistance

Receives noise-free view of the whole field

Can only send occasional messages to players (info, advice, freeform, etc.)

Used for opponent modelling, game analysis, giving strategic tips to teammates

Page 32: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

RoboCup Clients

Page 33: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Some RoboCup Clients

UvA Trilearn (Amsterdam) (2003 champion)

CMUnited (Carnegie Mellon)

Everest (China)

FC Portugal 2003 (Portugal)

HELIOS (Japan)

Magma Furtwangen (Germany)

Page 34: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Typical Approaches

Hard-coded behaviour

Scripted behaviour (e.g. planning)

Neural Networks

Opponent Modelling

Layered Learning

Behaviour Networks

Page 35: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Example: UvA Trilearn

Coordination Graphs for passing, anticipating passes

Layered skills hierarchy (pass, intercept)

Formations

Behaviour modelling of opponents

Page 36: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Example: FC Portugal

Strategic, ball possession, ball recovery behaviours

“Situation Based Strategic Positioning”

Given game situation, calculated best position and go there

Page 37: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Example: Krislet

Only one strategy: run to the ball and try to kick it!

Surprisingly effective

Written in Java, easy to extend

Page 38: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Example: Stripslet

STRIPS style linear planning

Written by Aloke Wiki

Based off of Krislet

A Stripslet implementation is made up of four main concepts: Actors, Sensors, Actions, and a GoalList

Page 39: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

ActorsThese are designed to implement a specific action, such as run-to-ball or score-goalContains two main elements, an execute method – providing the functionality, and a name – which is used as a key into a hash table.To add a new Actor

Add a new class to the Actor.java, implementing the Actor InterfaceAdd the new Actor to the ActorTable hash in StripsBrain.java

Page 40: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

SensorsThese consist of objects which include a sense method, as well as a name for a hash table key.Each is designed to determine the boolean outcome of a specific predicate, such as can-see-goal.To add a new Sensor:

Add a new class to Sensor.java, implementing the Sensor InterfaceAdd the new Sensor to the SensorTable hash in StripsBrain.java.

Page 41: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

ActionsActions consist of four members: name, precoditionList, addList, deleteList.name corresponds directly to that of the Actor name property (e.g. “score-goal”)precoditionList is a list of predicates which must be true before execution of the action (e.g. “have-ball can-see-goal”)addList is a list of predicates that will be true upon execution of the action (e.g. “ball-in-net”)deleteList is a list of predicates that will be false upon execution of the action (e.g. “have-ball”)

Page 42: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

ActionsTo add an Action:

StripsBrain maintains a list of actions, so any new actions must be added to this listNote that multiple predicates in a list are separated by spaces

•actionList.add(new Action("score-goal", // name

• "have-ball can-see-goal", // pre

• "ball-in-net", // add

• "have-ball")); // delete

Page 43: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

GoalListContains a list of goals for which the agents try to achieveCurrently the default list consists of only one predicate: “ball-in-net”Interesting possibilities include

Adding multiple goalsRe-evaluating the goal list each cycle depending on the environment

Page 44: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Developing Clients

www.robocup.org

Soccer Server Manual

Start with Krislet and Stripslet

Older server versions required (v 5.xx)

Page 45: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Other Projects

Soccer Server 3D

3D Soccer Monitor (Robologvis)

Tools to convert logs into Flash animations

Log analyzers (eg. Team Assistant, Paul Marlow’s Classifier)

Page 46: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

My Project“Scene” Learning and Recognition

Could an agent learn from observing another?

Could a team observe another and as a result start playing “similar to” what it saw?

As little human intervention as possible!

Page 47: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Project Goals

Scene Generation

Extract data from game logs

Create scenes - “snapshots”

Scene Learning (Reasoning)

Associate key scenes, patterns of scenes, with action taken

Page 48: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Project Goals

Scene Recognition

Build a RoboCup client

Searches from a stored library of key scenes and actions

Evaluate performance (resemblances?)

Page 49: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

Scene Descriptions

Extreme

LeftLeft Center Right

Extreme Right

Immediate

Ball

Near Team Mate

Distant GoalOpponen

t

An idea by Prof. Esfandiari

Size of “slices” impacts complexity, accuracy

Page 50: An Introduction to RoboCup February 24, 2004 by Kevin Lam Portions by Paul Marlow.

References

• Most of the information about RoboCup itself was taken using from the RoboCup Soccer Server manual.

• For the latest manuals and code, visit the RoboCup project website at:

–http://sourceforge.net/projects/sserver