Page 36 of 42

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 15:00
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 21:39
by Anarchid

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 21:42
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?

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 22:02
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.

Re: Shard

Posted: 18 Jun 2014, 22:17
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 :)

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 23:17
by Anarchid
Interestingly enough, it just beat a CAI at titan duel at 97.0.1-43 and no error spam.

Mysteriouser and mysteriouser.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Jun 2014, 23:45
by Jools
Is it possible to add XTA support?

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 19 Jun 2014, 00:03
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 19 Jun 2014, 00:24
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 20 Jun 2014, 02:39
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

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 20 Jun 2014, 12:34
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?

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 20 Jun 2014, 12:40
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

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 20 Jun 2014, 15:02
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 20 Jun 2014, 16:47
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

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 25 Jun 2014, 12:23
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 26 Jun 2014, 00:51
by AF
I'd need to modify the C++ portion

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 03 Jul 2014, 19:56
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.

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Aug 2015, 13:19
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

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 18 Aug 2015, 21:40
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?

Re: Shard 0.35RC2 & 0.31.1 Not So Ballsey

Posted: 19 Aug 2015, 07:29
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,