presentation 1: planning & design software engineering team 2 cis 540, fall 2001

30
Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Upload: arlene-wiggins

Post on 29-Dec-2015

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Presentation 1: Planning & Design

Software Engineering Team 2

CIS 540, Fall 2001

Page 2: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

The team

Dave BaconJason BullokJustin HinsonMatt HoosierChris Orosco

Page 3: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Description of project

A classical strategy game, Hunt the Wumpus, requires a player to navigate through a cave to slay a man-eating beast (the wumpus).

Page 4: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Description of project (2)

Our task is to design and implement a multiagent version of the game such that:

– The agents play the game without help from human operators.

– The agents can cooperate to hunt the wumpus more effectively.

Page 5: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Introduction: Rules

A cave consists of an n x m grid of cells.

Page 6: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Introduction: Rules (2)

Players may walk from one cell to another cell that is directly north, south, east, or west of their location (no diagonal moves).

Some cells contain bottomless pits. Entering such a cell kills the player.

Page 7: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Introduction: Rules (3)

The wumpus (immobile) is located in a randomly chosen cell. A player is eaten and dies if he enters the wumpus’s cell.

A pot of gold is located in one cell. A player is awarded bonus points for finding and collecting the gold.

Page 8: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Introduction: Rules (4)

The player may kill the wumpus by firing an arrow into the wumpus’s cell when the player occupies an adjacent cell.

Page 9: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Introduction: Sensory information

The player begins the game with no knowledge of the cave’s layout or contents.

A player smells a stench if his location is adjacent to the wumpus.

The player feels a breeze if his location is next to a bottomless pit.

The player sees a glitter if the gold is in his current room.

Page 10: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Roles

Person Task

Dave Bacon GUI framework

Jason Bullok GUI rendering

Justin Hinson Core agent implementation

Matt Hoosier Inter-agent cooperation

Chris Orosco Main game engine

Page 11: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Reporting methods

Code reviews each meeting

Utilize pluggable architecture by demonstrating new functionality at each meeting

Conversations with individual team members

Page 12: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Risks

Nobody on team has prior A.I. experience.

Can we successfully re-implement the simulator engine?

Difficulty compartmentalizing the agent implementation – nextMove() algorithm will depend on all state information

Page 13: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Risk reduction

Study AI texts. Specific sections of textbooks exist for the “Wumpus World” problem.

Encapsulate the game logic inside abstracted “Agent” interface so that rest of project can proceed while logic is under development.

Page 14: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Resource requirements

Hardware– Server for CVS repository. Will be supplied

by a team member.

Software– Java 2 development kit

Other– Artificial Intelligence texts

Page 15: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Work Breakdown

Task Description Dep.

A Define project statement

B Produce object model A

C Implement engine skeleton B

D Devise inter-agent strategy B

E Build GUI around engine C

F Implement logic in agent C

G Integrate agent communication and strategy with core algorithm

D, F

H Integration, testing G, E

Page 16: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

A: Define project stmt.

Overall time: 1.5 weeks– Search web for similar projects (3 days)– Determine which set of rules to use for game

(1 days)– Determine level of cooperation needed

between agents ( 3 days )– Integrate above results into project statement

as given in this presentation. (2 days)

Page 17: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

B: Produce object model

Overall time: 1 week– Produce UML diagram of existing simulator

(2 days)– Determine what abstractions are re-usable (1

day)– Create a model that allows data hiding,

encapsulation, and interchangeability (3 days)

Page 18: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

C: Implement skeleton

Overall time: 1 week– Generate stub interfaces for basic compilation

(4 days)– Add ability for top-level engine to iterate

through agents’ turns and relay units of communication (4 days)

Page 19: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

D: Inter-agent protocols

Overall time: 3 weeks– Devise basic algorithm (2 weeks)– Map algorithm onto extension of object model

(2 days)– Implement cooperative agents as Agent

objects (7 days)

Page 20: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

E: UI

Overall time: 5 weeks– Define API (interfaces) that allows generic printAgent()

functionality (1 week)– Wrap a temporary text interface around the game engine (1

week)– Implement graphical ability to display current “snapshot”

of game (2 weeks)– Develop cell-rendering modules that handle delegation of

drawing characters (2 weeks)– Add animation to above cell renderers (2 weeks)– Integrate cell-renderers with general GUI framework (1

week)

Page 21: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

F: “Smart” agent

Total time: 3 weeks– Build a stand-in agent with no intelligence (3 days)– Add ability for agent to determine which squares are

safe/unsafe (2 days)– Implement safe route-calculation algorithm (5 days)– Logic for choosing among unsafe squares (3 days)– Find fastest way to kill wumpus once somebody

discovers his location (4 days)– Add peer-to-peer passing of basic perception

information (4 days)

Page 22: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

G: Integrating strategy

Total time: 2 weeks– Adapt single-agent game logic with multi-

agent strategy algorithm (1 week)– Integration testing on above result (1 weeks)

Page 23: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

H: Overall testing

Total: 1 week– Combine GUI and simulation engine (2 days)– Test result ( 2 days )– Write documentation (2 days)

Page 24: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Schedule: Gantt chart

Project def.

O.M.

Skeleton

Cooperation

Graphics

Smart agent

Integration

Testing

Page 25: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Schedule: projections

Schedule milestones:– Design finished: Sep. 24– Skeleton done: Oct. 4– GUI done: Oct. 22– Logic done: Nov. 22– Finish: Nov. 30

Page 26: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Design: background

Existing simulator is shown at left.

This engine is useful as a guide, but is not reusable.

Page 27: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Design: old game engine diagram

Page 28: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Design: old engine problems

Model is entangled, not much abstraction.

Poor encapsulation (public member variables abound)

“Everybody knows about everybody”

Long, complex algorithms with no documentation/comments

Page 29: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Design: new object model

Page 30: Presentation 1: Planning & Design Software Engineering Team 2 CIS 540, Fall 2001

Designs: benefits of new model

Pluggability:– Programming against interfaces allows

swapping modules in/out at will

– Allows incremental development of intelligence, inter-agent strategy