Git Product home page Git Product logo

space_agent_essex_uni's Introduction

spaceBattleGame

Created by Jialin Liu on 4 Oct 2016

CSEE, University of Essex, UK

Email: [email protected]

Game

Single- and 2-player space battle game, derived from the original Spacewar. The framework is adapted to the GVG-AI competition.

Spaceship

Each player/agent controllers a spaceship which has a maximal speed (units distance/game tick), and slows down over time. At each game tick, the player can choose to do nothing or to make an action among {RotateClockwise, RotateAnticlockwise, Thrust, Shoot}. A missile is launched while the Shoot action is chosen and its cooldown period is finished, otherwise, no action will be made (like do nothing). The spaceship is affected by a random recoil force when launching a missile.

Missile

A missile has a maximal speed (units distance/game tick), and vanishes into nothing later (e.g. after 30 game ticks). It never damages its mother ship.

Score

Every time a player hits its opponent, it obtains r points (reward). Every time a player launches a missile, it is penalized by a predefined c points (cost). Given a game state s, the player i has a score calculated using the number of lives subtracted from the opponent and the number of launched missiles by player i.

End condition

The end consition is playable, the current one is detailed here. A game ends after T game ticks. A player wins the game if it has higher score than its opponent after T game ticks, and it's a loss of the other player. If both players have the same score, it's a draw for both. Another common end codition is the game ends if one of the player loses a number of lives.

Visualisation

Every spaceship has a radius of 20 pixels and every missile has a radius of 4 pixels in a layout of size 640*480.

Parameter space (game space)

Once a parameter setting is chosen, a new game instance is created. The playable parameters are listed in ontology/Constants.java. Examples are, but not limited to, the speed of spaceship/missile, the reward of hitting the opponent, the cost of firing, the radius of spaceship, etc.

Structure of The Repository

physics

The physics in the game, for instance, the gravity, the random repulsive force, etc. The use of physics increases the stochasticity of the game.

asteroids

The main game objects in the game.

The main game and abstract class of players.

Human controllers and deterministic controllers, and some sample AI controllers from the GVG-AI. The heuristics are also placed here, as they are parts of AI controllers.

This is the same as the one in the GVG-AI competition. The total game ticks of a game and the legal time for making a decision at every game tick are set in competition/CompetitionParameters.java, for the purpose of being adapted to the controllers submitted to the GVG-AI competition.

Our optimiser BanditEA. The simpler version for binary problem is introduced in our arxiv paper Bandit-Based Random Mutation Hill-Climbing.

Tests. Please refer to test/GameTest.java for an example of using this framework.

space_agent_essex_uni's People

Watchers

 avatar  avatar  avatar  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.