ianmitchell / pylonconstructioninc Goto Github PK
View Code? Open in Web Editor NEWProject for CSC 480 Artificial Intelligence
Project for CSC 480 Artificial Intelligence
At a certain point, it needs to stop requesting them too (when resource nodes are saturated). Currently, the AI constantly builds workers and assigns them to ResourceManager.
When workers come, need to peel 1-2 workers off mineral line (per enemy worker) and defend base with them. Only need this until there is an army unit out, or a cannon.
As reported by Talha
update method will be used to update each manager. For example, when a unit is destroyed, JavaBot will tell the managers to update
the main purpose of update is to update the internal structures of the managers when events occur
ratios are used for unit composition (i.e., 5 goons for 1 zealot)
types are used for unit types (buildings and upgrades)
I believe this is because ResourceManager doesn't currently offer units back up (JavaBot can't steal them back) and as a result, there are no units to build it with. Needs to be looked into.
This should be done once the first pylon has been constructed
Not sure if this is a bug or not, but sometimes it seems like the Pylons are built relatively close to one another. Is this intended behaviour?
Unit Manager needs to assign newly built probes to Resource Manager's mineralWorkers array list.
passing the probe and calling resourceManager.assignUnit should fix it.
Lots of code here and there that call System.out.print or bwapi.print, etc. Make sure all of yours gets cleaned up before Thurs.
Must 100% set this up beforehand.
Currently, the map our bot uses the most is Astral Balance. If they aren't using that one, find out.
Currently when attacking, army just moves to enemy base. That needs to be fixed
BuildManager should intelligently rebuild destroyed buildings
This was discussed with the team today. We agreed to send scouts after every 2.5 minutes of the previous scout.
Once it starts getting injured, the scout runs back to base. It is possible for enemy workers to follow him all the way back, and then they start attacking our workers. Don't lead back to our base, but instead pick a point elsewhere on the map to retreat to. If you reach that point and are still in RETREAT mode, then find a different point to retreat to that still isn't our base. Once no longer RETREATING, continue as normal (back to base, or back to scouting)
The current system does not store enemy structures while scouting. I suggest that the scout manager stores the enemy buildings while scouting.
JavaBot should just be interacting with the Managers; ResourceManager should be offering the unit up at a certain point, at which point JavaBot will assign it to Scout Manager.
Currently, BuildManager can't handle building much once the initial order is complete.
Maybe this is just me, but when I run the bot in starcraft if doesn't do anything anymore, maybe this is from things being moved around? Anyways, this was some simple scout stuff that would make it run away if it is attacked and run back if it sees a marine. It is untested though because nothing is working for me. See you guys tomorrow.
int enemy = getNearestUnit(UnitTypes.Terran_SCV.ordinal(), enemyPositionX, enemyPositionY);
for (BaseLocation base : JavaBot.bwapi.getMap().getBaseLocations()) {
if (base.isStartLocation()) {
JavaBot.bwapi.move(scoutSquads.get(0).getUnitId(), base.getX(), base.getY());
}
if(scoutSquads.get(0).scout.isUnderAttack()) {
JavaBot.bwapi.move(scoutSquads.get(0).getUnitId(), JavaBot.homePositionX, JavaBot.homePositionY);
}
else
{
if(getNearestUnit(UnitTypes.Terran_Marine.ordinal(), enemyPositionX, enemyPositionY) == -1)
{
if(getNearestUnit(UnitTypes.Terran_SCV.ordinal(), enemyPositionX, enemyPositionY) != -1)
{
JavaBot.bwapi.attack(scoutSquads.get(0).getUnitId(), enemy);
JavaBot.bwapi.printText("In your base killing your dooodZ!");
}
}
else
{
JavaBot.bwapi.move(scoutSquads.get(0).getUnitId(), JavaBot.homePositionX, JavaBot.homePositionY);
}
}
}
Finally got bwapi working. I noticed that two probes come off the line to go build a gateway, but when one starts to build it the other one just stops doing anything altogether and does not go back to the mineral line. I'll look into this and see if i can fix it.
Set up the initial data of the TrashManager. For example, the messages.
Cannons need different logic for their building: Put as close to chokepoint as you can while still being in pylon range
Haven't been able to test this yet, due to building problems.
With all 3 squads of units for each strategy, make sure you pick good times to attack / retreat / defend / etc.
If enemy scout attacks a worker(in ResourceManager):
Check if army manager has a unit in the area. If it doesn't, have the attacked probe and a friend retaliate. If the attacker flees, send the attacked to chase until chokepoint. Friend should go back to resource collection.
Can reuse some code from Squad Manager. Might be worth making a Utils Class
This should be done once scouting manager locates enemy base.
I've noticed when a gas worker constructs a building, he will go back to base and mine minerals, and not gas.
unitOrder in BuildManager can get filled up with repeated units pretty fast
buildmanager is unable to find places to build buildings sometimes
When the game initializes after a game, our variables aren't reset. They need to be reset so that we don't have to restart the AI.
Assigning to myself; will complete this task once everyone has this implemented in their respective files.
@tsaifi9
@alvinfeng
@jaldag
@Phancycat
We should probably just create a public void reset() {...}
method on the interface, and have everyone implement it.
Later on in the game (maybe 6 minute mark; idk google toss strategy) start scouting again. Iterate over baselocations (excluding our bases)
As reported by Talha
UnitManager is no longer necessary. Before James strategy implementation, UnitManager was used to continuosly train probes + zealots.
With the Strategy Implemented, BuildManager now handles which building builds what because it contains the data structures for buildings. UnitManager does nothing currently
BuildManager needs to do some special checking for Nexus and have it built next to the next available, and nearerst, mineral fields
We need to have a design for the early/mid-game.
Tested on Terran and Zergs.
ScoutManager will sometimes relinquish control of scout when it reaches the enemy main base.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.