Skip to content

ensemble-ai/abl-assignment-gunrock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advanced task description:

Our goal for the advanced task was to create a series of bots which "intimidate" the player. Basically, we create 4 groups of 4 bots, each group with a different color, which I think of as packs. These four groups of bots surround the player in a semi-random pattern and "throw rocks" at the player at semi-random intervals. The also follow the player around, maintaining a little distance from the player but always being present and keeping pressure on the player. I think that the erratic movement of the bots adds to the effect of intimidation and violence. We made the following modifications to the base code:

Implement a Move action and a moveTo behavior. The behavior takes an X,Y coordinate and a botID and moves the desired bot to the X,Y position over time. We implemented this using the Pythagorean method, which results in a bit of wobble due to int vs. float issues.

Implement a SetColor action and a setColor behavior. The behavior takes an RBG value and a botID and updates the bot's color using a setColor method we implemented in the BotWME. We also added color sensing to the BotSensor.

Implement a SpawnBot action and a spawnFormation behavior. This behavior spawns 16 bots as four groups of four bots in a pattern around the player. Each group of bots is set to a different color using the setColor behavior.

Implement an updateFormation behavior, and sub-behaviors to manage each group. The main behavior simply calls the update behavior for each of the four groups. Each groups update behavior generates a random int and uses that to move the bot to within fixed range of the player's position over time. During movement and once the bots arrive at the position, we modified the move behavior to cause the bots to wobble more than they would otherwise, as we feel this increases the sense of aggression.

Modify the fire behavior and expand it to all four groups of bots. We modified the manageFiring behavior to take a botID, the "leader" of each group. We also modified the wait time in the fire function to use a random int so that the bots appear to "throw rocks" at the player at random intervals.

ABL-Assignment

Description

For this assignment, you will be authoring rudimentary, intermediate, and advanced ABL behaviors for a single agent that controls multiple bots.

Starter Tasks

  • Add a move action that takes a (int xdir, int ydir, int id) as input.
  • Make a MoveTo behavior that moves a bot to a target location over time.
  • Add a SetColor action that takes (int r, int b, int g, int id).
  • Add color sensing to the BotWME (this includes changes to BotSensor.java and BotWME.java).

Intermediate Tasks

  • Add on action that creates a new Bot
  • Create 4 bots and have them keep a formation around the player.

Advanced Tasks

Design and create a multi-bot social interaction that communicates to the player via movement and bot color. The player should be able to interact with your multi-bot behavior set through movement, shooting, or some other user interaction that you design.

Here are some spaces you can design multi-bot social interactions for but feel free to create your own:

  • loneliness - how would the bots make the player feel lonely?
  • factions - split the bots into two factions and put the player in the middle.
  • stigma - if the character or a bot had a stigma (i.e. an extremely undesirable social quality), how would the bots react? If a bot or player interacted with the stigmatized character, how should the others react?
  • building trust - The player starts as not being trusted by the bots. How would they gain their trust and how would the bots performance change?

Group Work Policy

You may work in teams of up to 4 people.

Grading

This assigment will be graded on a 100 point scale.

  • 30 Starter Tasks
  • 30 Intermediate Tasks
  • 40 Advanced Tasks

Turn-in

Push your code to your group's GitHub Classroom repository. The master branch will be graded.

Questions and Answers

Question: How do I build and run the project?

Answer: The process runs in two steps: 1) compile the .abl code into .java classes and 2) run the GameEngine with the newly-generated code. To help you with this, there are two classes that have a entry point for execution (i.e. they have a '''static void main(String args[])''' function declared):

  1. abl.build.AgentCompiler.java - This class invokes the compile in abl.jar to transcompile .abl code into .java code.
  2. game.GameEngine.java - This launches the game. The code for your abl agent must be transpiled by abl.jar before you can run this class.

Question: I have changed my code and recompiled the project but the change isn't seen when I run the GameEngine class. What do I do?

Answer: Periodically, Java doesn't recognize that the .java files generated by abl have change and fails to update the .class files. Run Project->Clean... on the project and try again.

Question: There is an debugger window that opens and my bots aren't moving. What's is happening?

Answer: You have the debug variable set to true in AgentCompiler.java. This tells ABL to run your agent in debug mode which opens the debugger window and automatically pauses your agent before its first decision cycle. Press the Continue button to proceed.

Screenshot of the ABL debugger

About

abl-assignment-gunrock created by GitHub Classroom

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages