Shard 0.4/dev - Page 36

Shard 0.4/dev

Here is where ideas can be collected for the skirmish AI in development

Moderators: hoijui, Moderators

User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

I'll put my config up in 3-4 hours.

I've researched the error a bit and "topic 3" is EVENT_UPDATE

I've done something different to your suggestion with regard to offsets thus far, instead modifying the spot map in spot_handler.lua.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

and it's only the change in spothandler to add 64 to the position that causes this? Removing those 2 lines fixes the error?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

I can't be sure of that because without mexes it never makes any units worth mentioning.

Running the same config on a 96.0 Shard, it had a 30-minute duel with CAI to its own bitter end.

There might be an engine or compatibility bug.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Shard

Post by Jools »

Forboding Angel wrote:There was a 3rd party tool created for OTA that would allow you to define weights, build orders and all other kinds of ai behavior.
It was the (mostly) harmless AI. Very good name also :)
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

Interestingly enough, it just beat a CAI at titan duel at 97.0.1-43 and no error spam.

Mysteriouser and mysteriouser.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Jools »

Is it possible to add XTA support?
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

If XTA doesn't do ZK-style gadget mexes, Shard can probably already XTA.

Otherwise, should be easy, but my interest is in making a basically functioning AI for stress-testing ZK in realistic environment (that is, when a player is not executed as a LuaRules task)

---

Is there a way to extract metal extraction radius from engine via Shard? Alternatively, is lua io stuff allowed in Shard Lua?

It seems that on some maps the "add 64" strategy still fails, so i've been thinking of just downloading the metal config from ZK somehow.

An alternative would be to establish some game-lua -> shard-lua messaging system. I know this question has been raised but i have no recollection to what came out of it.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Jools »

There is a mex-upgrader gadget, but that's probably not what you mean. XTA works very similar to ba, nota and techa. Some differences though: as the moho uses 300 energy to run the ai must first build energy. But I suppose it knows those things.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

No reason whatsoever that it can't happen if XTA is what I remember it to be like, just define the relevant build orders and list the attackers etc
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Jools »

XTA is the same, just some bugs have been converted to zombies.

Should I make a pull request? I looked at the BA folder of shard and saw a bunch of files. Is there a list of what files are needed and processed?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

Shard will load its own files, if you provide an xta subfolder, it will load its own files but if one is in that folder it will 'prefer' it.

As a bare minimum use Kernel Panic as an example:

https://github.com/Tarendai/Shard/tree/ ... data/ai/KP
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Jools »

Ok, and if I do that, how can I test the ai? Do I need to wait for a new version of spring dev for each time I test changes? Isn't the AI supplied with the engine?

Currently in XTA, Shard does nothing.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

Yes but there's nothing stopping you making lua changes, and i'm quite happy for you to redistribute Shard under a new name or version so long as you state it's based on Shard ( though there's nothing to prevent you if you don't )

Any changes you make, also put in a pull request so they're in the next official version

In the longrun it'd be great if somebody could implement the API using Spring gadget APIs so it could be distributed more flexibly
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

Is there any way of getting map extractor radius in Shard without modifying its cpp code? It seems the Java AI interface(s) can do it.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

I'd need to modify the C++ portion
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by Anarchid »

Now that this is out of the way, Shard can somewhat play ZK and even have a decent winrate vs CAI.

However, the same shard that does this in local games seems to not do anything when playing online? It seems that is somehow because it doesn't load the config.

Update: i've checked Lua load path for when running in both modes by hacking the cpp part slightly, and they're identical.

It seems that when running in a proper netgame, the subfolder overrides don't load.
This was a story about how i hacked cpp, while the actual problem was that in zk, the names of default commander differ between local and online play, while the config was too dumb to assign anything it got as commander.
User avatar
prandipadaro
Posts: 98
Joined: 19 Oct 2011, 22:38

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by prandipadaro »

Hi
i try to work on shard and i have a problem
i try to give an reclaim order to a unit with

Code: Select all

function reclaim_test(self)	
	order=CustomCommand(self.unit:Internal(), CMD_RECLAIM, {XXX})
	return order
end

where XXX is obteined from another unit with:

Code: Select all

XXX=self.unit:Internal():ID()
does not work, can you help me?

EDIT:
actually the unit starts to reclaim, but immediately it stops.
the work is performed only if it is the only one available for that unit
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by AF »

There's a lot of surrounding context here missing, and that it starts to reclaim then immediatley stops suggests you have implemented a system that's running alongside another system and the two aren't aware of each other. Where is the reclaim order being given?
User avatar
prandipadaro
Posts: 98
Joined: 19 Oct 2011, 22:38

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Post by prandipadaro »

the reclaim order is in the BA/taskqueues.lua
-- mobile construction units:
in the queue of

Code: Select all

local anyConUnit={
after

Code: Select all

BuildHeavyishAA,
Post Reply

Return to “AI”