FIT3094 : AI, ALife and Virtual Environments

 

Assignment 1: Pirates!
AI character control

Semester 1, 2015

Pirate Ship

Task

Design and implement controllers for a mobile, non-player character in the context of a simple multi-agent computer game, Pirates!

Rectangular Bay is, as its name suggests, a rectangular bay (doh — well, actually it is square!). It is surrounded on all sides and littered within by dangerous ship-smashing rocks. Word is out that Polygon Pete, the richest, meanest pirate that ever sailed the seas, has deposited marker-buoys around the bay and on its rocky islands. Beneath each of these is suspended a rope attached to a small chest of gold.

While Polygon Pete is on holiday in the Bahamas, all the local pirates are out scouring the bay for his treasure. You are to join them on your own ship which you drop from a helicopter into the bay...

Details

Wreckless

Non-player AI characters

  • Your pirate ship with a single front-facing cannon on board.

  • Everybody else's pirate ship with a single front-facing cannon onboard.
 

Player character

  • There are no player characters. All pirate ships are controlled by AI software that you and your peers will write for this assignment.
Saviour

Environment

The game is played around the Rectangular Bay environment that has been coded for you by the lecturer.

  • Rocks: At the edges of the bay and scattered around inside it are deadly rocks (see figure below). If your ship hits these they will damage its hull. Eventually this will cause your ship to sink. You can see these obstacles from a distance so that you can avoid hitting them.

  • Marker buoys: These indicate that Polygon Pete dropped a box of gold. Markers are very small and float on the water surface. Your ship can only see one when it is right on top of it. After gold is collected from beneath a marker by a ship, the marker remains in the water... so not all markers will have gold beneath them when your ship arrives.

Aim: Using an AI controller that you write, your pirate ship must navigate around the bay, searching carefully for gold without hitting rocks or other ships. Other pirates will try to beat it to the treasure. Your ship will need to avoid their cannons but of course it can use its own cannon to try to sink them!

Specification:

    1. Sail around the bay without colliding with rocks or other ships (10%)

      Test: Your ship is placed in a bay of rocks and non-shooting enemy ships. You lose marks for every collision with a rock or ship.

    2. Search (e.g. random, raster-scan, breadth-first search or better) the bay for gold (40%)

      Test: Your ship is placed in a bay with a few rocks and an ocean full of gold. You gain marks for every box of gold you collect in a fixed time limit so be efficient!

    3. Avoid being hit by cannon fire from other ships (20%)

      Test: Your ship is placed in a bay with a few rocks and several shooting enemy ships. You lose marks for every hit you receive from the enemy.

    4. Fire on other ships (10%)

      Test: Your ship is placed in a bay with a few rocks and several shooting enemy ships. You gain marks for every hit you make on the enemy.

    5. Win games against opponents by maximising the amount of gold collected! (15%)

      Test: Assessed by playing 10 games against your class mates (and, possibly, the lecturer). For each game, your ship will be deposited at a different random location in the bay with all other ships. Any ship that plays the game sucessfully and collects some gold during at least 1 of the 10 runs receives 5%. Any ship in the top 10 overall (within a lab class) after 10 games receives 10%. The winner overall in each lab class receives a full 15% for this component of the assessment and they may go up against the winning ships from other lab classes to determine the grand prize winner for the year.

      Components 1-4 are assessed by (i) the lecturer examining and running the code (ii) a compulsory demonstration during the designated lab class in which you place your ship into a bay filled with 10 (relatively stupid) enemy pirate ships designed by the lecturer as part of the framework.

    6. Write a document outlining (in plain English) the algorithms your ship follows to solve 1-5 above (5%)

Consult the assignment submission details for information on how to complete you work.

*Assignments that do not build and run correctly under UNIX within the framework provided will receive a mark of zero!


Last updated March 2015. Maintained by Alan Dorin.