Git Product home page Git Product logo

skillz-2018-old's Introduction

Skillz 2018

This repository contains the code for the bot for the Skill 2018 cyber competition.

Bot documentation:

Class Name Parameters Purpose
AggressiveBot SendCapsuleCaptures - Sends closest pirates to capsules to capture them.
AggressiveBot PushAsteroidsNearby - Makes pirates push asteroids that are nearby to avoid being destroyed.
AggressiveBot MoveToIntersection - Moves the capsule holders to an intersection and then to the best mothership.
AggressiveBot PushAsteroids - Sends pirates to push the asteroids towards either the enemy capsule or closest enemy grouping
AggressiveBot CheckIfCapsuleCanReach Pirate CapsuleHolder, Mothership mothership Checks if the given pirate can reach the given mothership without losing the capsule. If it can, it assigns the mothership as the destination.
AggressiveBot GroupPair Pirate first, Pirate second, Location destination Groups the two given pirates at the best intersection and then sends them towards the given location.
AggressiveBot AttackEnemies - Sends our pirates to attack enemy pirates.
DefensiveBot BuildDefensiveBunker - Builds a dual setup bunker at the best mothership for each capsule and attacks the capsule if it can. If the capsule is in PushRange * 2, the pirate sails towards it to attack it. It also checks if there is a nearby wormhole that reaches towards the capsule and pushes it away from the mothership.
DefensiveBot BuildBunkerForDefence - This bunker is used on defence mode, building a regular bunker that only pushes the nearby capsule and does not sail towards it if it's in PushRange *2
TryPush NumOfPushesAvailable Pirate enemy Returns how many of our enemies can push the given pirate.
TryPush PushDistanceAvailable Pirate enemy Returns how much distance the given pirate can be pushed by our pirates.
TryPush TryPushEnemyCapsule Pirate pirate, Pirate capsuleHolder Attempts to push the enemy capsule towards the other direction from the capsule's initial location. If can't push but in PushRange * 2, sails towards the capsule to attack it.
TryPush TryPushAsteroid Pirate pirate, Asteroid asteroid Pushes the given asteroid towards the closest enemy grouping or the closest asteroid to destroy it.
TryPush TryPushAsteroidTowardsCapsule Pirate pirate, Asteroid asteroid Attempts to push the give asteroid towards the closest capsule's interception line.
TryPush TryPushEnemy Pirate pirate, Pirate enemy Attempts to push the given enemy towards the closest border.
TryPush GetGroupingNumber Pirate pirate Returns how many pirates are around the given pirate in the range of PushRange * 2
TryPush TryPushMyCapsule Pirate myPirateWithCapsule To be added.
TryPush PushAlliesToEnemy Pirate target To be added.
TryPush PushWormholes - Sends pirates to push wormholes to the best location according to the priorities class.
TryPush TryPushWormhole Pirate pirate, Wormhole wormhole Makes the given pirate attempt to push the wormhole to the best location according to the priorities class.
TryPush PushEachOther - Makes the pairs of capsule holders push each other into the mothership if needed.
TryPush PushPair Pirate pirate1, Pirate pirate2, Location destination Makes the given pirates push each other into the given location.
TryPush TryPushEnemyCapsuleDefensively Pirate pirate, Pirate capsuleHolder Makes the given pirate attempt to push the given capsule holder towards the negative direction of the capsule's initial location, without sailing towards it if it is in PushRange * 2.
Extensions Steps this Pirate pirate, MapObject mapObject Returns how much turns until given pirate reaches the map object.
Extensions Sqrt this double num Returns the square root of the given double.
Extensions Max params int[] numbers Returns the maximum number from the given params array.
Extensions Min params int[] numbers Returns the minimum number from the given params array.
Extensions Power this int num, int power Returns the num to the power of power.
Extensions Power this double num, int power Returns the num to the power of power.
Extensions Print this string s Debugs the given string if the debug is enabled.
Extensions IntersectionPoint Location enemyLoc, Location myLoc, Location destLoc, int S1, int S2 Returns the intersection point of line enemyLoc=>destLoc and myLoc according to the given speeds.
Extensions Interception Location a, Location b, Location c Returns the interception of the line a=>b with the point c.
Extensions IsOnTheWay Location a, Location b, Location c, int buffer Returns if the given c is on the way of the line a=>b in the range of the buffer.
Extensions DistanceLP Location a, Location b, Location c Returns the distance between the line a=>b and point c.
Extensions NumOfAvailableEnemyPushers Pirate pirate Returns the number of enemy pirates that can push the given pirate.
Extensions NumberOfPushersAtLocation Location location Returns the number of enemy pirates that can push at the given location.
Extensions MidPoint Pirate pirate1, Pirate pirate2 Returns the middle point between the two pirates.
Extensions DistanceThroughWormhole Location from, MapObject to, Wormhole wormhole, IEnumerable wormholes Returns the distance through the wormhole from the current location towards the destination.
Extensions WormholePossibleLocationDistance Location from, Location to, Location wormhole, Location partner To be added.
Extensions ClosestDistance Location from, MapObject to, IEnumerable wormholes Returns the closest distance from the from to the to.
Extensions GetBestWormhole Location destination, Pirate pirate Returns the best wormhole for the pirate to take to get to the destination the fastest.
Extensions GetBestMothershipThroughWormholes Pirate pirate Returns the best mothership through the wormhole distance and the value multiplier.

Bot stats:

Week 1 (Asteroids):

Bot name Level Result Score Turns Explanation
LargeRocks 1 Win 8/3 230 -
OneManArmy 1 Win 1/0 400 -
Steroids 1 Win 8/0 225 -
GeorgePushSenior 2 Win 1/0 750 We have un-used pirates as we removed the AttackEnemies. We need to use them for something else.
YouShallNotPass 2 Win 8/7 366 -
Meteorite 3 Win 8/0 155 -
Leptopn 3 Win 8/4 286 -
Voyager1 4 Win 8/4 259 -
Pullpullon 4 Win 8/2 218 -
Overall results: 9/9 Pass

Week 2 (Wormholes):

Bot name Level Result Score Turns Explanation
SpaceTime 1 Win 8/7 269 -
Momentum 1 Win 8/0 349 -
GravityWaves 2 Win 8/1 245 -
Graviton 2 Win 3/2 38 -
Spaghettification 2 Win 8/7 247 -
OutOfSpace 3 Win 8/1 362 -
Pushti 3 Win 8/4 729 -
William 4 Win 9/7 600 -
Pullpushon 4 Loss 8/1 218 -
Overall results: 8/9 Pass

Week 3 (Heavy pirates):

Bot name Level Result Score Turns Explanation
Deathstar 1 Win 12/4 246 -
StaticVoid 1 Win 8/1 408 -
StateMachine 2 Loss 3/2 400 Bot bunkers up our capsule spawn with 40 pirates. Need to implement pushes into capsule capturers.
SpaceRace 2 Loss 1/0 21 This bot acts sort of as a race, we need to protect our capsule and make it a normal pirate.
DarkInvasion 3 Win 2/0 400 -
HeavyLifting 3 Win 8/4 258 We need to make our capsule holders become heavy pirates upon being in danger and implement the push enemy into it.
NeutronStar 3 Win 8/2 396 We need to utilize heavy pirates and make them more useable with capsule holders and bunkers (add pushes till border)
Pushiner 4 Loss 8/4 210 Make bunker pirates switch to normal if heavy then once in the bunker switch them back to heavy.
GravitySlingshot 4 Loss 4/1 47 This pirate boosts it's capsule holder towards the mothership. We need to counter that.
Overall results: 5/9 Didn't pass
Last updated: 16/FEB/2018 21:04

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.