1 / 17

Using FLUX to model The RollerSlam game

Using FLUX to model The RollerSlam game. Fluent Calculus x FLUX. First Step: Defining the Fluents and the actions. RollerSlam (Fluents). RollerSlam (Fluents). RollerSlam (Fluents). RollerSlam (Actions). RollerSlam (Actions).

hasana
Download Presentation

Using FLUX to model The RollerSlam game

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Using FLUX to model The RollerSlam game

  2. Fluent Calculus x FLUX

  3. First Step: Defining the Fluents and the actions

  4. RollerSlam (Fluents)

  5. RollerSlam (Fluents)

  6. RollerSlam (Fluents)

  7. RollerSlam (Actions)

  8. RollerSlam (Actions)

  9. Second Step: Defining the precondition and state update axioms

  10. Programming in FLUX • Precondition Axiom: • Poss(A(x), z)  πA(x,z) or • NotPoss(A(x), z)  ¬πA(x,z) • State Update Axiom • StateUpdate(z1, A(x), z2)  Δ(x, z1), Update(z1, v+, v-, z2) • Do(s, z0, z) • do ([], Z, Z) • do([A|S},Z0, Z) :-poss(A, Z0),sateUpdate (Z0, A, Z1), do (S, Z1, Z2)

  11. Initial State • Init(z0)  Consistent(z0), DuplicateFree(z0)

  12. Defining the ‘poss’ axioms • poss(throwA(Agent,Strength),Z1) :- holds(hasBall(Agent), Z1), not_holds(inGround(Agent),Z1). • poss(release(Agent),Z1) :- holds(hasBall(Agent),Z1). • poss(dash(Agent),Z1):- not_holds(inGround(Agent),Z1). • poss(kick(Agent,Strength),Z1) :- holds(hasBall(Agent), Z1), not_holds(inGround(Agent),Z1). • poss(tackle(Agent,AgentB,vector(Xmax, Ymax), MaxDistance),Z1) :- not_holds(inGround(Agent),Z1), holds(hasBall(AgentB), Z1), not_holds(counterTackle(AgentB),Z1), closer(Sxa, Sya, Sxb, Syb, MaxDistance). • poss(counterTackle(Agent),Z1) :- not_holds(inGround(Agent),Z1). • poss(hit(Agent,Strength, MaxDistance),Z1) :- not_holds(inGround(Agent), Z1), closer(Sxa, Sya, Sxb, Syb, MaxDistance). • poss(catchA(Agent, MaxDistance),Z1) :- not_holds(inGround(Agent),Z1), not_holds(hasBall(Agent), Z1), closer(Sxa, Sya, Sxb, Syb, MaxDistance). • poss(standUp(Agent),Z1) :- holds(inGround(Agent),Z1).

  13. Pre-Conditions For Ramification • poss(ramifySit2, Z1):- holds(isMoving(Ball, Attrition), Z1). • poss(ramifySit3, Z1):- holds(outBoundary(Object), Z1).

  14. ‘State_update’ axioms • state_update(Z1,dash(Agent, vector(X,Y)),Z2,[]) :- holds(acceleration(Agent, vector(X0,Y0)),Z1), update(Z1,[acceleration(Agent,vector(X,Y))],[acceleration(Agent, vector(X0,Y0))],Z2). • state_update(Z1,throwA(Agent,Strength),Z2,[]) :- (poss(throwA(Agent,Strength),Z1), holds(position(Ball, vector(X0, Y0)),Z1), X #= X0 * Strength, Y #= Y0 * Strength, update(Z1,[position(Ball, vector(X,Y))],[hasBall(Agent),position(Ball, vector(X0, Y0))],Z2)) ; (not poss(throwA(Agent,Strength),Z1), Z2=Z1 ). • state_update(Z1,release(Agent),Z2,[]) :- (poss(release(Agent),Z1), update(Z1,[],[hasBall(Agent)],Z2)) ; (not poss(release(Agent),Z1), Z2=Z1).

  15. ‘State_update’ axioms • state_update(Z1,kick(Agent,Strength),Z2,[]) :- (poss(kick(Agent,Strength),Z1), holds(position(Ball, vector(X0, Y0)),Z1), X #= X0 * Strength, Y #= Y0 * Strength, update(Z1,[position(Ball, vector(X,Y))],[hasBall(Agent),position(Ball, vector(X0, Y0))],Z2)) ; (not poss(kick(Agent,Strength),Z1), Z2=Z1). • state_update(Z1,tackle(Agent,AgentB,vector(Xmax, Ymax), MaxDistance),Z2,[]) :- (poss(tackle(Agent,AgentB,vector(Xmax, Ymax), MaxDistance),Z1), holds(position(Agent, vector(Sxa,Sya)),Z1), holds(position(AgentB, vector(Sxb,Syb)),Z1), update(Z1,[inGround(AgentB)],[hasBall(AgentB)],Z2)) ; (not poss(tackle(Agent,AgentB,vector(Xmax, Ymax), MaxDistance),Z1), Z2=Z1).

  16. ‘State_update’ axioms • state_update(Z1,counterTackle(Agent),Z2,[]) :- (poss(counterTackle(Agent),Z1), update(Z1,[counterTackle(Agent)],[],Z2)) ; (not poss(counterTackle(Agent),Z1), Z2=Z1). • state_update(Z1,hit(Agent,Strength, MaxDistance),Z2,[]) :- (poss(hit(Agent,Strength, MaxDistance),Z1), holds(position(Agent, vector(Sxa,Sya)),Z1), holds(position(Ball, vector(Sxb,Syb)),Z1), X #= Sxb * Strength, Y #= Syb * Strength, update(Z1,[position(Ball, vector(X,Y))],[position(Ball, vector(Sxb,Syb))],Z2)) ; (not poss(hit(Agent,Strength, MaxDistance),Z1), Z2=Z1).

  17. ‘State_update’ axioms • state_update(Z1,catchA(Agent, MaxDistance),Z2,[]) :- (poss(catchA(Agent, MaxDistance),Z1), holds(position(Agent, vector(Sxa,Sya)),Z1), holds(position(Ball, vector(Sxb,Syb)),Z1), update(Z1,[hasBall(Agent)],[],Z2)) ; (not poss(catchA(Agent, MaxDistance),Z1), Z2=Z1). • state_update(Z1,standUp(Agent),Z2,[]) :- (poss(standUp(Agent),Z1), update(Z1,[],[inGround(Agent)],Z2)) ; (not poss(standUp(Agent),Z1), Z2=Z1 ).

More Related