Minesweeper example - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Minesweeper example

Description:

... decides to stomp, and communicates its decision to the controller. The controller performs a stomping action and ... What solver is going to stomp first? ... – PowerPoint PPT presentation

Number of Views:307
Avg rating:3.0/5.0
Slides: 19
Provided by: ramon4
Category:

less

Transcript and Presenter's Notes

Title: Minesweeper example


1
Minesweeper example
  • MAS course
  • Ramon F. Brena

2
Minesweeper
3
Environment perspective
4
Minesweeper Environment
  • Board will be managed by an agent
  • Controller agent
  • There will be one agent for each square in the
    grid
  • Solver agents

5
Organizational Perspective

Controller
Solvers
6
Roles
  • Controller
  • Consults and modifies squares status
  • Responds to solver queries, giving information
    about the result of an action
  • Solver
  • Proposes actions on the grid (stomp, mark)
  • Ask neighbor solvers about their status
  • Discusses with other solvers

7
Controller role
  • Permissions
  • Read square (i,j) public status in
  • Unknown (covered)
  • 0 8 (bombs near)
  • Read square (I,j) hidden status in
  • Free
  • Bomb
  • Modify public status from Unknown to 0..8

8
Controller role
  • Responsibilities
  • Liveness properties
  • (PerformStompMark)? Win Lose
  • Safety properties
  • Maintain board coherence (e.g. no 2 is near 3
    bombs, etc.)
  • Do not accept solutions after Lose

9
Solver Role
  • No permissions
  • Responsibilities
  • Liveness
  • (ConsultNeighStatus PerformStomp Mark) ?
  • Safety
  • Do not stomp unless sure or stuck

10
PerformStomp Protocol
  • Description
  • A solver agent decides to stomp, and communicates
    its decision to the controller. The controller
    performs a stomping action and returns the
    resulting status to the solver.
  • Initiator A solver
  • Respondent The controller

11
PerformStomp Protocol
  • Inputs (information used by the role initiator
    while enacting the protocol)
  • Solvers position / identity
  • Outputs (information supplied by the protocol
    responder during interaction)
  • Solvers new status

12
PerformStomp diagram
Protocol Name PerformStomp
InputSolvers (I,j)
Initiator A Solver
Respondent Controller
OutputSolvers new status
Description A solver agent decides to stomp, and
communicates its decision to the controller. The
controller performs a stomping action and returns
the resulting status to the solver
13
ConsultNeighStatus
Protocol Name ConsultNeighStatus
InputSolvers (I,j)
Initiator Solver (i,j)
Respondent Solver (n,m)
OutputSolver (n,m) status
Description A solver agent in position (I,j)
asks agent in position (n,m) about its status,
and a corresponding answer is issued by solver at
(n,m)
14
ConsultNeighStatus issues
  • Is it possible to ask about a distant solver
    status?
  • If NO, how this restriction is enforced?
  • Other possibility is to ask the controller, not
    other solvers

15
Initialization issues
  • How to start the game?
  • What solver is going to stomp first?
  • At startup, solvers could wait a random amount of
    time, then ask for a reservation to stomp first
    to all other solvers
  • When a reservation demand is received, no other
    reservation is demanded, and a warrant is issued

16
FirstStomp protocol
Protocol Name FirstStomp
InputSolvers (I,j)
Initiator Solver (i,j)
Respondent Solver (n,m)
OutputWarrant from (n,m)Confirmation from (i,j)
Description A solver agent tries to be the first
to stomp on the grid, so asks other solvers to
refrain from doing so and to give a warrant
17
Refinement cycle
Roles' Protocols and Activities
Protocols details
18
Other issues
  • User interface
  • Could be part of Controller
  • Could include a step button
  • Game termination
  • Win-related protocols
  • Lose-related protocols
  • Harder situations (not locally solvable)
Write a Comment
User Comments (0)
About PowerShow.com