Coder Social home page Coder Social logo

warbot-jin's Introduction

warbot-jin

An AI for the warbot game we developped for a school project

Image of the game

The code is based on the one our teacher gave us, and is meant to work in a Netlogo project he gave us. We had to code some turtles of a faction which would evolve in a world with some resources and an ennemy faction.

Rules

  • Code the behaviour of the one faction's turtles
  • Do not rely on any color based function, your faction color can change depending on your opponent
  • The turtles are of types : bases, explorer, harvester and rocket launcher

Restrictions

  • Turtles have limited memory slots (10 in total)
  • Turtles can only access information within their range (they can't memorize another turtle id and access its position using the id if they are not in range)
  • We should not base our strategy on an example layout (two bases for each faction aligned on the y axis)

Our strategy

  • Could be described as a kind of Zerg Rush
  • Continuously produce explorers
  • Make explorers share information and monitor its propagation
  • Use explorers to find resources and take information to the base
  • Once the base knows where to find resources, search for an enemy base
  • When found, either commit suicide on it or go share the position based on probabilities and whether the base knows this base position
  • No use of Rocket Launcher
  • Two harvester per base, which try to create farms

Retrospective

  • This strategy was a lot of fun to imagine and code
  • It proved quite efficient despite its absolute simplicity
  • We had no time to test it against other players, but it seemed quite obvious that it was efficient against factions that use all of their resources at the beginning
  • When the rush begins and explorers crash themselves, they produce resources that can easily be transformed into really good farms
  • Thus, if the first rush fails, it often enables the enemy's fast growth
  • With better farming and a concerted rush, this strategy could be improved (gather all around a base and rush simultaneously for instance)

warbot-jin's People

Contributors

madewink avatar matthias4217 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

warbot-jin's Issues

Manage farms

Farms are much needed, but how do we manage it ?

We could do as follow :

  1. Go near base, on an empty plot
  2. Plant seed
  3. If burger is ready, collect it
  4. Return to base, and give food if we have any, collecting mature burgers on the way

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.