Giter VIP home page Giter VIP logo

robakka's Introduction

robakka

robakka is a programming game in scala. It is based on akka (http://akka.io) to model the agents in the game. Also it is not round based but implemented to allow the agents to react in real-time to events. Agents are customized by implementing a certain behaviour.

This game is inspired by RobotWar (https://en.wikipedia.org/wiki/RobotWar) and cells (https://github.com/phreeza/cells).

Behaviours in robakka

The main challenge of the game is to implement behaviours which can beat others. I provide some pretty simple behaviours and will continue to add more as development progresses.

For example check out FollowPlantBehaviour which will cause all agents with the installed behaviour to move to the field of a plant if there is one in their neighbourhood. If there is no plant, the behaviour causes the agent to randomly search for another plant. All agents with this behaviour are pacifists, they only eat plants and never shoot anyone! The implementation of it is quite simple:

package io.github.tdhd.robakka.behaviours

import io.github.tdhd.robakka._
import io.github.tdhd.robakka.Agent.MoveCommand

case object FollowPlantBehaviour extends BaseBehaviour {
  def act(entity: World.AgentEntity, worldState: World.StateContainer) = {

    val plants = BehaviourHelpers.entities2MoveCommand(entity, worldState)

    val move = plants.collect {
      case (plant: World.PlantEntity, moveCommand) => moveCommand
    }.headOption.getOrElse(BehaviourHelpers.getRandomMove)

    Agent.CommandSet(move = Option(move))
  }
}

About robakka

robakka is in early development and barely useable at the moment.

Why the name robakka?

robakka is a combination of robot and akka, the underlying modelling framework of the agents.

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.