Recent Changes - Search:

HomePage

Members

Past Meetings

Want to Present?

Discussion

Suggestions

CSRG Pages

Reading List

Links

Organizers' Page

pmWiki Help/Info

edit SideBar

GameWorld

This is an agent-based model that consists of agents that occupy cells on a 2D grid. In each step of the model, a random ordering of agents is cycled through, in which each agent executes its step() function. Agents can move, turn, and stab on their turn. The object of the game is to create a rule set for your agents that succeeds in stabbing the largest number of other agents while preventing your agents from being stabbed.

Getting source

  • log in to a cscs computer
  • mkdir wherever
  • cd wherever
  • cp -r /users/erjank/CSAAW/GameWorld1 .
  • cd GameWorld1
  • /users/rlr/Courses/531/Src/changeProjectDir.pl

Compiling

  • bin/compile.sh

Running

  • bin/guirun.sh &

Creating an Agent

Copy AgentA.java to Agent(Something).java. Edit the new file, choosing a color for your agent and editing the step() method with the behavior you like. See Agent.java for the moving, turning, and stabbing functions.

To add your new agent in an instance of the game, edit Model.java. In the function userBuildModel, edit numberOfClasses to be the number of different agent classes you would like, and the instructions for adding your agents. E.g. if number OfClasses==4, there should be 4 if statements, that addAgent((Agent) new SomeAgent()) numPerClass times.

Specs/Todo

Currently, there is no randomization of the turn order of the agents, nor anything keeping track of the score. Play with it and add what you want!

Edit - History - Print - Recent Changes - Search
Page last modified on January 13, 2009, at 07:50 AM