Code Monkey home page Code Monkey logo

robocode's Introduction

Robocode (CS255)

Artificial Intelligence coursework, designing and developing an AI for the Robocode game. For more info, please refer to the project report.

Dependencies

Other than Robocode, which is required to run the AI simulation, the robot has no further dependencies than standard Java libraries.

Compiling the Robot

With Robocode running, access the Source Editor using

CTRL+E

From here, locate Wilde.java and use the Editor's built-in compiler to compile and package the robot with

CTRL+B

Save the file and, when prompted, click YES to save the compiled robot within Robocode's own robots directory.

Running 'Wilde' Within Robocode

With Robocode running, begin a new battle using

CTRL+N

From the available robots, add u1409675.Wilde to the list of selected robots. Feel free to add any other robots to fight against, in melee (a multi-bot free-for-all battle) or 1-vs-1 combat.

Click Start Battle to then begin the simulation.

About the AI

Wilde is a solution to the Robocode challenge which extends the Simple Robot class - this means it can only perform actions sequentially and is unable to target, move and fire concurrently. A detailed report is provided, covering the design and implementation of the robot's AI in detail.

As an overview, the AI is comprised of three main areas:

1. Targeting

The targeting is Guess Factor-based, implementing a wave-based virtual bullet system to quickly learn possible bullet hit angles based on enemy movement patterns. It prioritises the closest known enemy as its target and is versatile across both melee & 1-vs-1 battles.

The AI is segmented to allow more accurate guesses in 1v1 combat, where scans are more frequent.

2. Movement

In melee battles, the movement operates a Minimum Risk algorithm, calculating which direction will be the least dangerous to move into based on the locations and states of its enemies.

In 1-vs-1 combat, a Psuedo-Random pattern is adopted, attempting to remain perpendicular where possible for maximum escape angle from incoming bullets while moving random distances to counter pattern recognition-based targeting.

3. Radar

The radar uses a Weak Target Lock, attempting to remain focused on its target but scanning the entire battlefield when said target is lost - this happens often - to either find the existing, or a better (closer) target.

robocode's People

Contributors

alexjamesmacpherson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.