Giter Club home page Giter Club logo

bc19's Introduction

Battlecode 2019 Bot

This is team "Codelympians" source code for our bot. We competed in JavaScript this year.

We finished 9th overall out of 600+ registered teams, 4th out of all high school teams.

Our final bot that got submitted is in the root directory and is called botfinal.js (or check out mini.js, our entire bot on one line of code)

A commented version and with logs is located in the folder bot1.

DISCLAIMER:

The code was written for speed and under a lot of time constraints. Hopefully comments will help, but do not expect the code to be really readable whatsoever.

High Level Overview

Our general strategy was the following:

In the first 3 turns, we build pilgrims and depending on the map, we will employ prophet harassment to try and take over resource deposits near the middle of the map

After that, it is all turtling and a lot of church lightnings.

Every single church that is on a resource deposit within 64 r^2 units away from the opposite resource deposit on the map is marked as in danger, and will subsequently build up a defence of about 12 prophets.

Afterwards, our castles each produce 1 scouting pilgrim to determine a frontline, a line determining how far our units can go before getting shot at by the enemy.

The 1 scout also serves as the intiator for church lightnings.

In the end, if we haven't lost a castle yet, we build a lot of crusaders. If we did lose a castle, our bot should tell everyone to rush at the enemy although this is probably broken.

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.