Example of Draft KobrA-2 PIM - PowerPoint PPT Presentation

About This Presentation
Title:

Example of Draft KobrA-2 PIM

Description:

Small scale: soccer penalty simulation. Large scale: Rollerslam simulation. 3. 2. 1. Y ... Ball. 9 Subject Component MAS PenaltySim AgentAction ... – PowerPoint PPT presentation

Number of Views:102
Avg rating:3.0/5.0
Slides: 30
Provided by: jacque4
Category:
Tags: kobra | pim | ball | draft | example | soccer

less

Transcript and Presenter's Notes

Title: Example of Draft KobrA-2 PIM


1
Example of Draft KobrA-2 PIM
  • Jacques Robin

2
Case-Studies for Agent andGame Related Extensions
  • Small scale soccer penalty simulation
  • Large scale Rollerslam simulation

gameOver, goal
action(s,legs,shoot(2)) action(k,legs,move(right))
3
2 b k
1 s
Y X 1 2 3
3 b
2 k
1 s
Y X 1 2 3
actions(k,legs,move(right))
3
2 k
1 s, b
Y X 1 2 3
3
2 k, b
1 s
Y X 1 2 3
3
2 k, b
1 s
Y X 1 2 3
action(k,hands,grab(yes))
action(s,legs,shoot(3)) action(k,legs,move(right))
gameOver, nogoal
3
PenaltySim Specification Class Diagram
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
4
PenaltySim SpecificationComponent Diagram
IPenaltySim
PPenaltySim
5
PenaltySim SpecificationProtocol State Machine
new()
created
run()
run()
running
stopped
stop()
6
PenaltySim Realization Class Diagram 1
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
2
ltltReflexAgentgtgt Player
ltltAgentActiongtgt PlayerAction
Ball

9
Goal
3
ltltAgentActiongtgt ArmAction
ltltAgentActiongtgt LegAction
FieldObject
FieldZone
ltltAgentActiongtgt GrabAction
7
PenaltySim Realization Class Diagram 2
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
2
2
ltltEffectorgtgt Legs do(roleRole,actionLegAction)
2
ltltusegtgt
ltltusegtgt
ltltReflexAgentgtgt Player
ltltusegtgt
ltltReflexAgentgtgt Kicker
ltltReflexAgentgtgt Keeper
8
PenaltySim Realization Class Diagram 3
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
ltltEnvironmentgtgt ltltAutomataAgentgtgt PenaltyEnv
ltltusegtgt
ltltusegtgt
ltltInterfacegtgt IPenaltyEnv ltltcreategtgt
new() initialize() getEnvState()
EnvStateKind -reason(shooterActionPlayerActionin
, keeperActionPlayerActionin,
shooterPerceptsXYCoord3out,ordered,
keeperPerceptsXYCoord3out, ordered)
9
PenaltySim Realization Class Diagram 4
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
ltltComponentgtgt CommincationChannel
10
PenaltySim Realization Component Diagram
ltltSubject Componentgtgt ltltMASgtgt PenaltySim
REnv
RPlayer2
RChannel
PEnv
PPlayer
ltltEnvironmentgtgt ltltAutomataAgentgtgt PenaltyEnv
ltltcreategtgt -new() -initialize()
-getEnvState() EnvStateKind
-reason(shooterActionPlayerActionin,
keeperActionPlayerActionin,
shooterPerceptsXYCoord3out,ordered,
keeperPerceptsXYCoord3out, ordered)
ltltReflexAgentgtgt Player ltltcreategtgt -new()
-initialize() -getState() AgStateKind
-getRole() String -reason(perceptsXYCoord3
ordered) PlayerAction
RLegs
REyes
RSendPercepts
RGetActions
PChannel
PEyes2
PLegs2
ltltAgentgtgt Shooter
PGetActions
RArms
PArms
ltltAgentgtgt Keeper
PSendPercepts
11
PenaltySim RealizationComposite Structure Diagram
rsRPlayer
reREnv
ltltMASgtgt PenaltySim
pePEnv
ltltEnvironmentgtgt ltltAutomataAgentgtgt PenaltyEnv
ltltSubjectComponentgtgt ltltMASgtgt penaltySim ltltcreate
gtgt -new()
rspRSendPercepts
rgaRGetActions
pspRSendPercepts
pgaRGetActions
ltltComponentgtgt CommunicationChannel
rlsRLegs
plsPLegs
ltltReflex Agentgtgt Shooter
resREyes
pesPEyes
psPPlayer
plkRLegs
rakRArms
pcPChannel
rlkRLegs
pakPArms
ltltReflexAgentgtgt Keeper
rekREyes
pkPPlayer
pekPEyes
rcRChannel
rkRPlayer
12
PenaltySim RealizationActivity Diagram 1
PenaltySim.new()
connect(rs,ps)
connect(rk,pk)
connect(re,pe)
PenaltyEnv.new()
connect(rc,pc)
connect(rls,pls)
connect(res,pes)
Shooter.new()
connect(rlk,plk)
connect(rak,pak)
connect(rek,pek)
Keeper.new()
connect(rga,pga)
CommunicationChannel.new()
connect(rsp,psp)
13
PenaltySim Realization Activity Diagram 2
run()
sShooter
ePenaltyEnv
kKeeper
e.initialize()
k.initialize()
s.initialize()
e.sendPercepts(s)
e.sendPercepts(k)
spXYCoord3
kpXYCoord3
k.reason(kp)
s.reason(sp)
saLegAction
kaPlayerAction
k.do(keeper,ka)
s.do(shooter,sa)
saLegAction
kaPlayerAction
e.reason(sa,ka,sp,kp)
14
Player Specification Class Diagram
FieldObj
Ball
ltltAgentActiongtgt PlayerAction
ltltSubject Componentgtgt ltltReflexAgentgtgt Player
ltltusegtgt

ltltusegtgt
ltltAgentActiongtgt LegAction
ltltAgentActiongtgt ArmAction
ltltusegtgt
ltltReflexAgentgtgt Kicker
ltltReflexAgentgtgt Keeper
ltltAgentActiongtgt GrabAction
ltltenumerationgtgt AgStateKind empty initialized per
ceptsReceived actionChosen actionSent
15
Player Specification Component Diagram
IPlayer
PPlayer
ltltSubject Componentgtgt ltltReflexAgentgtgt Player ltltcr
eategtgt -new() -getState() AgStateKind -getRole()
String -reason(perceptsXYCoord3ordered)
PlayerAction
ltltsensorgtgt Eyes
REyes
ltlteffectorgtgt Legs
RLegs
ltlteffectorgtgt Arms
RArms
16
Player SpecificationProtocol State Machine
new()
empty
initialize()
initialized
CommunicationChannlerself.sense()
perceptsReceived
CommunicationChannlerself.sense()
reason(perceptsXYCoord3ordered)
actionSent
actionChosen
selfCommunicationChannel.do(Role,Action)
17
Shooter Realization Class Diagram
ltltSubject Componentgtgt ltltReflexAgentgtgt Shooter
ltltReflexReasonergtgt ShooterReflexReasoner
18
Shooter Realization Component Diagram
IPlayer
PPlayer
ltltSubject Componentgtgt ltltReflexAgentgtgt Shooter
REyes
ltltsensorgtgt Eyes
ltlteffectorgtgt Legs
RLegs
RPRR
IPlayerReflexReasoner
PPRR
REyes
ltltReflexReasonergtgt ShooterReflexReasoner ltltcreat
egtgt -new() reason(perceptsXYCoord3ordered)L
egAction
ltltsensorgtgt Eyes
ltlteffectorgtgt Legs
RLegs
19
Shooter RealizationComposite Structure Diagram
psPPlayer
ltltReflexAgentgtgt Shooter
rlsrrRLegs
rlsRLegs
resrrREyes
ltltReflexReasonertgtgt ShooterReflexReasoner
resREyes
ltltdelegategtgt
ltltdelegategtgt
psrrPPRR
rsrrRPRR
20
Shooter Realization Activity Diagram 1
Shooter.new()
connect(rsrr,psrr)
delegate(resrr,res)
ShooterReflexReasoner..new()
delegate(rlsrr,rls)
21
Shooter Realization Activity Diagram 2
spXYCoord3ordered
Shooter.reason(sp)
shooterX sp1.x
keeperX sp2.x
ballX sp3.x
ballY sp3.y
ballX lt shooterX
shooterX lt ballX
shooterX ballX
ballY 0
else
shooterX lt keeperX
keeperX lt shooterX
shooter X keeper X
sa void
saLegAction
22
Keeper Realization Class Diagram
ltltSubject Componentgtgt ltltReflexAgentgtgt Keeper
ltltReflexReasonergtgt KepperReflexReasoner
23
Keeper Realization Component Diagram
IPlayer
PPlayer
RLegs
ltltSubject Componentgtgt ltltReflexAgentgtgt Keeper
REyes
ltlteffectorgtgt Legs
ltltsensorgtgt Eyes
ltlteffectorgtgt Arms
RArms
RPRR
IPlayerReflexReasoner
PPRR
REyes
RLegs
ltltsensorgtgt Eyes
ltlteffectorgtgt Legs
ltlteffectorgtgt Arms
RArms
24
Keeper RealizationComposite Structure Diagram
pkPPlayer
ltltReflexAgentgtgt Keeper
rlkRLegs
ltltdelegategtgt
rlkrrRLegs
rekrrREyes
ltltReflexReasonergtgt KeeperrReflexReasoner
rekREyes
ltltdelegategtgt
rakRArms
ltltdelegategtgt
rakrrRArms
pkrrPPRR
rkrrRPRR
25
Shooter Realization Activity Diagram 1
Shooter.new()
connect(rkrr,pkrr)
delegate(rlkrr,rlk)
ShooterReflexRuleBaseComponent..new()
delegate(rakrr,rak)
delegate(rekrr,rek)
26
Keeper Realization Activity Diagram 2
kpXYCoord3ordered
Keeper.reason(sp)
shooterX sp1.x
keeperX sp2.x
ballX sp3.x
ballY sp3.y
ballX lt keeperX
keeperX lt ballX
keeperX ballX
ballY keeperY
else
sa GrabAction.new()
sa void
kaPlayerAction
27
PenaltyEnv Specification Class Diagram
ltltusegtgt
ltltusegtgt
ltltAgentActiongtgt PlayerAction
ltltInterfacegtgt IPenaltyEnv ltltcreategtgt
new() initialize() getEnvState()
EnvStateKind -reason(shooterActionPlayerActionin
, keeperActionPlayerActionin,
shooterPerceptsXYCoord3out,ordered,
keeperPerceptsXYCoord3out, ordered)
ltltAgentActiongtgt LegAction
ltltAgentActiongtgt ArmAction
ltltAgentActiongtgt GrabAction
ltltenumerationgtgt EnvStateKind empty initialized ac
tionsReceived perceptsUpdated perceptsSent
28
PenaltyEnv SpecificationComponent Diagram
IPenaltyEnv
PPenaltyEnv
ltltSubject Componentgtgt ltltEnvironmentgtgt ltltAutomataA
gentgtgt PenaltyEnv ltltcreategtgt -new()
initialize() -getEnvState() EnvStateKind
-reason(shooterActionPlayerActionin,
keeperActionPlayerActionin,
shooterPerceptsXYCoord3out
,ordered, keeperPerceptsXYCoo
rd3out, ordered)
ltltsensorgtgt GetActions
RGetActions
RSendPercepts
ltlteffectorgtgt SendPercepts
29
PenaltyEnv SpecificationProtocol State Machine
initialize()
new()
empty
initialized
lt
CommunicationChannlerself.getAction(shooter,LegAc
tion)
CommunicationChannlerself.getAction(keeper,Player
Action)
actionsReceived
reason(shooterActionPlayerActionin,
keeperActionPlayerActionin,
shooterPerceptsXYCoord3out,ordered,
keeperPerceptsXYCoord3out,
ordered)
perceptsUpdated
selfCommunicationChannel.sendPercepts(shooter)
selfCommunicationChannel.sendPercepts(keeper)
perceptsSent
Write a Comment
User Comments (0)
About PowerShow.com