Giter Site home page Giter Site logo

bryansweber / cunyaimodule Goto Github PK

View Code? Open in Web Editor NEW
6.0 5.0 3.0 160.89 MB

CUNYBot, an AI that plays complete games of Starcraft.

License: MIT License

C++ 98.58% CMake 0.02% Python 1.37% C 0.03%
starcraft economics genetic-algorithm multi-armed-bandit

cunyaimodule's Introduction

CUNYAIModule

Description: CUNYBot (City University of New York) is a C++ bot that plays a full game of Starcraft:BW as the Zerg race. Its central design feature is a focus on historical economic models. In particular, it focuses on the capital/labor ratio (k), and technology/labor ratios (t), where it responds to percieved opponent's choice of k. The resulting emergent behavior can be characterized as a greedy tit-for-tat style response. Its current win rate on BASIL is about 50%.

Link to complete bot description here: https://ieeexplore.ieee.org/document/8490444

Other measures of bot performance are available at: https://www.basil-ladder.net/ranking.html#Bryan%20Weber

Recent Development Notes:

(1/23/2021) You can now play against this bot as a human on SCHNAIL: https://schnail.com/#/home

(11/17/2020) We now use grids for some portions of combat, 256x256 arrays. We also use 2 similar phases of "reservation". The first is the already existing build order system (not BOSS) executes preselected plans. It passes this plan to a short term reservation manager, so long as it does not collide with an existing reserved resource (larva, min, gas, supply). All macro actions (morph, build, research) are now reserved through this short term reservation manager, which allows for us to "multitask"- such as building lings with excess minerals while still saving for gas-heavy purchases like mutas.

(9/29/2020) Operationally, we have backed out of python and pybind11. There are various operating theaters for bots and it is challenging to find one method execution that works for all of them.

(2/19/2020) This is a huge update. The bot now uses Python via pybind11. This permits (easy) access to the python libraries, but greatly increases the size of the bot. Installation now requires manually downloading python36.dll and using pip to install the requisite dependancies. An option to compile without these dependancies is still available.

(9/26/2018) Incorperated FAP fully, BWEM is now used for pathing and movement, and BWEB is now used for building, including some walls at the natural. Several functions have been deeply refactored (particularly workers) and combat has been deeply streamlined for student use. The bot now makes some estimates of what opponents may have behind the fog of war, and better responds to observed technical investments.

(9/6/2018) Current drafts of CUNYBot are responding to opponent's choice of t as well, and the overall observed behavior remains a tit-for-tat style. Technology has been closely integrated and better improved in current versions, but have not yet released these to SSCAIT. Tasks at hand are generally production choices, and reducing waste in combat. To that end, FAP has been added as a combat simulator. It also serves as an agnostic method of choosing which units to produce, with some caveats.

cunyaimodule's People

Contributors

bryansweber avatar johnwjackson avatar kikwon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cunyaimodule's Issues

Units may conga line into enemy base.

The case appears to be one where:

  1. The closest e unit (by air) is a weak or isolated combat unit.
  2. The ground path to the e unit is convoluted and blocked by a superior e force.
  3. Friendly unit then is "suprised" by enemy force along path.

Missing Minerals

Misses an entire mineral patch on destination. Seems to happen on a few other maps.

Drones are being double-counted by minerals.

Problem: one drone is assigned to a mineral.
Mineral increments.
Drone is assigned elsewhere (?)
Mineral is not decremented.

Solution outline: Have each mineral track the names of the units attached to it every frame?

Units don't recognize they're being killed as they fight.

E-local eminates from the target.
Friendly-local eminates from the self.

There is a non-overlapping area (especially noticeable for long long range units), where an enemy unit can be OUTSIDE of range of my target, but able to attack me. (usually from the side or behind or something)

Bot occasionally loses track of inventory.

Time of problem: Often mid-game, close to 140ish control.
Perhaps this is related to the death of minerals that usually occurs at that time.

Description of problem: I can see rapid fluctuation in the count of workers, and larva and eggs.
Sometimes, I see variation in the counts of hydralisks as well.

Consequence of problem: The bot then is unable to establish its state and freezes. But not all units. Perhaps only those on the field at the time of the crash? The bot often becomes unstuck after massive losses.

Bot lacks aggression - passive play.

When the bot has defeated an attack, it does not counterattack.

There have been a few flawed attempts to enable counterattack when my army >>> their army. Resulted in unwanted behavior and suicidal units.

ID Enemy Base

Attract units towards enemy base, permitting aggressive strategies

UnitRenegade

Bot doesn't recognize when we lose a unit from mind control.

speed upgrade is inaccurate

After getting speed upgrades, the ingame speed remains the same. All units are roughly 50% faster after the upgrade.

limited drone building?

drone building has been stalled or severely limited after mineral lock has been implemented. Cause unclear.

Bot sometimes freezes early in game

Roughly around gas timing. Floats to nearly 600 minerals.

May also freeze mid-late game somewhere around 100-ish control. Probably related, but cause unclear.

Expo issues remain

Expo reserved spot too early, did not resend drone.

Potential idea: remember drone of choice and resend that particular one? could send command more frequently as well.

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.