Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Astazha

#1
I can't give you the exact details because I'm reformatting my computer but the last argument of AISetStockUnitNext has 2 values

one is something like c_stockIdle and the other is something like c_stockAlways.  I'm going from memory here.

The idle one, which I think is the false value, doesn't tell it to not stock that item yet, but rather to build up to it only with idle production capacity.  In the testing I've done with Zerg, if you tell it to build a bunch of drones with the c_stockIdle function and nothing else is going on it will start building Drones 1 at a time, not building a new one until the last one is finished (presumably to not use up all the larva since it's only supposed to be using "idle" production capacity.)

I think there's some other difference between this and AISetStock, but I'm not entirely clear on what it is.  I stopped doing detailed testing on these because I intend to try to work without them.
#2
- Array sizing does not support operators like:


int[c_myConstant+1] myArray;


This is easy enough to get around.


- Access to multi-dim arrays does not seem to work.  This code:


result=omOvermindMemory[memIndex][c_OM_InitializedIndexOffset];


stops the validate on a parse error.  memIndex is an int.


Thanks again for all of your work Lapin.
#3
AI Development / Re: Evolution of the Overmind
March 23, 2010, 10:23:08 PM
Bloodyaugust:  I... think I sent you a PM.  DarkBlizz's message system seems a little wonky.
#4
AI Development / Re: Evolution of the Overmind
March 23, 2010, 04:46:47 PM
The new Intel functions track where the expansion locations are, and which ones have been used by enemy or friendly players. 


Preliminary test code has successfully used the data provided by the Intel functions to send an Overlord to the enemy's main (once the initial Drone scout finds it) to monitor production.  This results in a more accurate unit count and better decisions about what to build,  how many to build, and when to attack.


Future development will improve upon these successes to include:
  - moving the Overlord when he is in danger, and early enough to get clear.
  - placing scouts at nearby locations to monitor expansion activity.
#5
I haven't messed with them.  In general though, the states are just player specific variables that can be set and checked in other code, and are retained between execution cycles (static).


I'm not using that stuff for the most part because some of the Blizzard code might take action based on it somewhere, and I don't want unknown/unexpected things happening.
#6
OpenGnd0 from Starcrack runs a function called GenericOpen() or something like that.  It's in MeleeStateHandler.galaxy and it eventually passes control into the mid & late game.
#7
Quote from: Kernel64 on March 21, 2010, 06:17:45 PM
Obviously, this can be developed further. And as you can see, even if c_townOne is used at both cases, the queen will still be ordered to move to c_townTwo.

I have no idea what's going on with that.


I think this might be the culprit:


Quote OTarg = AIRandomSpawnPoint (player, r, 50, 100, 3);
Those 50 & 100 values set a min/max distance from the enemy.  What happens if the minimum distance from the enemy can't be reached within the region you specified?  Will she move outside of it (and towards your natural expansion by default)?

I'm interested in this because I want to learn about what kinds of unit management functions we have, but I don't actually think that shuffling a Queen back and forth from Main to Expansion is very useful.  She can barely keep up with spawning larva at one Hatch, and when you add travel time and the possibility of losing her in transit it doesn't seem worthwhile.

I could see performing one time reassignments - you might start a Queen for an expansion before it's Hatch is built and then just send her over, for example.  Or she might flee a dying expansion and be used for healbot duty until a free Hatch was available that needed larva.

I'm also interested in trying her out as a battle healer.  She could be a key part of a Nydus drop, coming out 1st and keeping the canal exit healed until the army can get out.  She would also be devastating as part of an Ultralisk raid - her healing combined with their damage mitigation would make for a very long lived assault.  Her speed would be an issue though - you'd probably want Overlords and/or a Nydus canal to facilitate her transport and to serve as a shelter if she gets targetted.  I think healing duty queens might be valuable in other circumstances too - anywhere that you have expensive units really - Guardians, Infestors, Mutalisks.  Particularly in a heavy air battle scenario where minerals are plentiful and gas is scarce.

We would need to make significant alterations to her Tactical AI to assess whether she was part of a Hatch/Queen pair or assigned to a wave as healer.  I'm still learning about waves etc. but I think it will be possible to code.
#8
AI Development / Re: States and Rolls
March 21, 2010, 10:25:21 AM
Thank you for exploring this and sharing what you found.  There's a lot of mysterious stuff in that API.
#9
Well, I was just using Point(150,150) on a 4 player map, which was roughly the top right corner.


GetUnitPosition() returns a point, as does the townlocation function (I forget the exact name but you should be able to find it.)
#10
AI Development / Re: my AI
March 21, 2010, 05:05:34 AM
There's a lot to summarize...


MeleeAI.galaxy starts off and sends things over to the primary file for the race.  Zerg.galaxy or Protoss.galaxy or whatever.  From there you're sent into Zerg0.galaxy for the AI that comes with the game, or if you're using Starcrack it sends you into TriggerLibs/Zerg/ZergOpen.galaxy.


Starcrack and the Blizz AI set things up in stages, Open, Mid, Late.  Poke around, let us know if you have specific questions.
#11
Yeah, it's doable.
#12
LOL, I suppose so.  I started messing with scouting because I wanted to have some easy successes after becoming frustrated by trying to make the AI calculate a build order on it's own.  That's harder than I expected.
#13
Been messin' with Overlords myself.  I had the selection as scout disabled, but not the part in AINewUnitZerg() where it assigns them to the extra scout group.  I should try that.


Anyway, I could move them, but they'd just return after arriving at the destination.  I made sure they weren't in any waves.


What finally worked for me was creating a new wave just for the Overlord and setting it's gather point where I wanted him to go.  If I order him somewhere else he'll go there and then return to the gather point.


I haven't messed with it a lot.  The next piece I wanted was to send him to the enemy town, and then I realized that I didn't know how to do that without cheating.


One thing that will be easy to do will be send overlords to monitor expansion locations - especially the obstructed, out of the way, and island ones.
#14
I assume that yours looks something like this:


Include "TriggerLibs/Zerg0"
Include "TriggerLibs/ZergFuncs"




Or that you have your include at the bottom.




If so, try moving your Include above the one for Zerg0 so that your file has already been included when Zerg0 gets parsed, that way it has already read your function definitions before it sees Zerg0 using them.


Like this:


Include "TriggerLibs/ZergFuncs"

Include "TriggerLibs/Zerg0"


Alternately you could put your include at the top of Zerg0.galaxy
#15
It's using AIFind() and limiting the range, which might be an option, but yuck.


Quote

//  Check to see if there are enough basic units around to follow.
    if ((UnitGroupCount(AIFilterPathable(AIFindUnits(enemyPlayer, c_PU_Zealot, here, range, c_maxEnemyCount), here), c_unitCountAlive) >= 2) ||
        (UnitGroupCount(AIFilterPathable(AIFindUnits(enemyPlayer, c_ZU_Zergling, here, range, c_maxEnemyCount), here), c_unitCountAlive) >= 2) ||
        (UnitGroupCount(AIFilterPathable(AIFindUnits(enemyPlayer, c_TU_Marine, here, range, c_maxEnemyCount), here), c_unitCountAlive) >= 2)) {
        return ord;
    }


You'd essentially have to visit every one of your units every cycle and ask if there were any enemy buildings within it's sight range, and even then it would pick up things you shouldn't see, like anything cloaked.


All of the buildings show on the mini-map once you've seen them, you'd think their locations would Galaxy accessible somehow. 


Here's location once you have it:


UnitGetPosition(aiUnit);


I suppose you could monitor the known unit count for buildings and when it goes up go check the sight range of all of your units for that type of building in their range, grab the building, grab the location, and see whether it was far enough away from previous locations to warrant entry as a new "town"


Such a catalog would also help you pin down proxy gateways.  What a hassle though...