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 - MTops

#1
I am working on an AI that does not cheat in any way. I have found a unit flag that I can use to test if a unit is visible (through the fog of war) or not. By forcing the AI to use information based on what he has seen, he has the same chances a human player would have.

But having the AI actually scan the screen would be impossible. Because the AI does not use a screen or camera to speak of. As far as I know anyway.
#2
AI Help Section / Re: AI and fog of war?
September 16, 2010, 08:14:59 AM
Hah, did some extensive digging and found something that will help:

bool libNtve_gf_UnitIsVisibleToPlayer (unit lp_unit, int lp_player) {
    // Implementation
    return UnitFilterMatch(lp_unit, lp_player, UnitFilter((1 << c_targetFilterVisible), 0, 0, 0));
}

This function exists in NativeLib.galaxy. Apparently the UnitFilter tag "Visible" is based on the fog of war.

So now I can tell which building has been "spotted" without having to check the sight range of every unit the AI controls.
#3
AI Help Section / AI and fog of war?
September 16, 2010, 03:09:00 AM
I am working on my AI being as smart as possible regarding enemy unit/building positions without using a scouting cheat. However, this is made extremely difficult because of the lack of functions that obey the fog of war. As far as I know.

The only function I have discovered that obeys the fog of war is AIKnownUnitCount, which returns an amount the AI thinks a player has based on what he has scouted.

But when I want to know the static defense status of the enemy to decide which expansion to harass, knowing how many there are is not enough, I need to know WHERE they are.

I haven't been able to find another function that could help with this in any way. AIFindUnits doesn't obey the fog of war, it simply returns the current situation. So I am currently forced to manually scan and store information about static defenses which means a huge performance hit.

Has anyone found a better method?
#4
AI Development / Re: Build Flags research
August 23, 2010, 02:18:20 AM
Thanks for your reply. It made me dig through the GT AI files to see how you had the AI build at specified coordinates. It never occurred to me that you can create a build command with AICreateOrder.

This is actually huge. This amount of control can really make a difference. Big hug! :jig:
#5
AI Development / Build Flags research
August 20, 2010, 09:19:30 AM
We all know the SetStockEx function has a buildFlags argument that gives the scripter a bit of control over the building placement of the AI.

There is a list of different options in the BuildAI.galaxy file which can be combined to produce specific results.

I would like to combine all our knowledge about these options so we can get a better understanding of what our technical possibilities and limitations are.

First of all most of the options can be split into three categories:
avoid/near
close/far
location

The avoid/near part is obvious, do you want the building placement to be NEAR the spot you specify or AVOID that spot.

The close/far part is not obvious. At least not to me. Close and far usually mean a relative distance. Relative to what is unclear...

As for the location options, let's take a look at them individually:
- PowerOrCreep: the meaning seems obvious, but how does it work exactly in relation with the close/far options. This option is helpful for new pylons to avoid Close- and FarPowerOrCreep to have them build outside of an existing power field, for more coverage.

- Factory: I assume this means any building capable of producing units. So you can either build more factories right next to them, or have your tech buildings avoid them, I guess. No idea about the close/far thing.

- Defense: I'm thinking defensive buildings, but not 100% sure.

- Dropoff: not a clue.

Now let's move on to the other options.

- Resource: available in the near/avoid variety. Used for building themain building near the resources, or building defensive structures near the workers to give some harassment protection.

- ChokePoint: also available in the near/avoid variety. This is a popular one. You can have the AI build buildings near the choke point/ramp with this one. However, since it's NEAR and not AT, you will never be able to get the AI to wall off his ramp with only this.

- ValueSpace: comes with the minor and major options. Not sure what it does, but I'm guessing it takes into account to amount of free space around the spot.

- CanLower: this is usually given to supply depots, to let the AI know this building won't block unit movement after being build.

- OnVespeneGas: obvious on. Only works on geyser buildings.

- OnlyHere: no idea, the AI doesn't seem to build the building at all if this flag is set.

- IgnoreDanger: no idea either. Does it normally take danger into account? How? What is the result? What is danger exactly?

If there is any information you have that could make this post more complete, please post it so we can have a reference for all AI developers out there.

PS Some months ago, I saw a YouTube video of an AI developer who managed to get his AI to build Pylons all around the edge of his base. Anyone know who that was, or how he did it? Was it just with the build flags or is there another way to control building placement?
#6
AI Scripts / Re: Working on a professional AI
August 19, 2010, 01:28:53 AM
Nice to see someone's still alive in here. :)
Could you please tell me your experience with SC2 AI development?
#7
AI Scripts / Working on a professional AI
August 18, 2010, 08:39:10 AM
Hello everyone,

My name is Maarten Tops.

I am working on a new AI for StarCraft 2 on a professional level.
I'm currently following the course International Game Architecture & Design at a university in the Netherlands.
I have the next 8 months for this project as this is my graduation project for school.

I have been studying a lot of SC2 strategies in the past month and I've also been poking around in the official Blizzard AI script files.

It is always nice to know some people who work on similar projects so you can talk to each other, give feedback and exchange knowledge and experience if needed.
I hope I can find people like that here, since this is the first SC2 community site I have found that has a specific forum for AI development, but I also noticed the lack of posts since the official release of SC2.

So if you're still here, let's hear it! :)