Page 1 of 42

Shard 0.4/dev

Posted: 24 Mar 2010, 22:51
by AF
This is NTai's replacement, and part of my university project. I'd appreciate it much if you could help give feedback!

A follow up release will be made at the weekend with extra API additions such as game:SendToContent(luatable) for gadget communication, and anything anyone puts forward between now and then.

Until then, you can see what it is and the details over on my blog:

(LGPL V2)

0.4 is bundled with Spring, be sure to state which version of the engine you're using as not all versions of 0.4 are the same ( they all show as 'dev' in the lobby )

Information and Documentation can be found at https://shard.tomjn.com

File issues at https://github.com/tomjn/shard

If there's an emergency contact me on twitter @tarendai

Travis Build Status: Image

Re: Shard

Posted: 25 Mar 2010, 00:58
by AF
It would appear for some people spring fails to find shard upon game start, I cannot reproduce this after testing on my macbook and my main machine and getting working instances of Shard

edit:: rebuilt, it seems that it relied on a dll for the debug runtime but not everyone has it, so its a part of the skirmishai.dll now, repackaged as 0.1b

Re: Shard

Posted: 25 Mar 2010, 09:38
by hoijui
maybe make clear that this is for current release (?) version of spring (0.81.2), and that the download contains only the binary for windows, and source code is not yet available.

Re: Shard

Posted: 25 Mar 2010, 10:02
by Zydox
Which mods is it made for?

Re: Shard

Posted: 25 Mar 2010, 10:03
by Forboding Angel
Played around with this quite a bit earlier. It has the makings of becoming the first ever truly customizable AI that spring has seen. I don't remember the name of the tool, but you OTA people probably will... 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.

The upshot of it is that I could create an AI configuration that would play fairly similar to the way I play. The potential and power of this thing is, imo, huge, even moreso once it's seen some real use by us gamedevs and AF gets some good feedback. I personally am a massive fan of it being modularized.

As an example, kaik and RAI can almost always be guaranteed to put up a decent fight, but you have to put them on 100% bonus just to get them to attack in a lot of cases. Even worse, they are very predictable. Now that isn't the most damning sin known to man, but it does get kinda boring. For example I can tell you exactly how an RAI will lay out it's base every single time, and there isn't any way to change it short of asking reth to program in more behavior mechanisms.

Shard seems to allow you to shape the AI to your liking. I have no doubt that a frontend for taskqueues could be set up so that complete newbies could shape their own individual AI setup to their liking.

Long story short, I'll be using this rather extensively, and nice work AF! :-)

Edit: Zydox ninja'd me. @zydox, you can use it for any mod just about. You could write a CA one without much trouble, or NOTA, or SA, etc.

Re: Shard

Posted: 25 Mar 2010, 10:25
by AF
I've a follow up release due tonight with a handful of minor changes:

- When a file is loaded using game:executefile it will now print any errors it comes across
- Added game:AverageWind()
- Added game:SendToContent(string), this should allow passing strings to lua gadgets, Ill be adding a similar version that takes a lua table and unpacks the returned value into a lua table, so less faffing around with strings
- Default taskqueue has been modified to take account of wind, kaiser has been editing the example task queues to add vehicle plant task lists so that they don't sit idle

I'll be fleshing out behaviours over the weekend once Ive gotten a coursework deadline out of the way.

Also keep in mind that the default attackhandler code won'tsend out a group of attackers smaller than 10.

Re: Shard

Posted: 25 Mar 2010, 10:25
by AF
I've a follow up release due tonight with a handful of minor changes:

- When a file is loaded using game:executefile it will now print any errors it comes across
- Added game:AverageWind()
- Added game:SendToContent(string), this should allow passing strings to lua gadgets, Ill be adding a similar version that takes a lua table and unpacks the returned value into a lua table, so less faffing around with strings
- Default taskqueue has been modified to take account of wind, kaiser has been editing the example task queues to add vehicle plant task lists so that they don't sit idle

I'll be fleshing out behaviours over the weekend once Ive gotten a coursework deadline out of the way.

Also keep in mind that the default attackhandler code won'tsend out a group of attackers smaller than 10.

Re: Shard

Posted: 25 Mar 2010, 10:51
by hoijui
what are your plans in terms of closed/open source?
just thinking, as you would not have to copy your change-log into forum if it was open (not that this is bad, just seems uncomfortable for you).

Re: Shard

Posted: 25 Mar 2010, 11:08
by AF
Its not something I can really deal with without talking to my supervisor. The lua is unavoidably wide open to view, but academia!

Re: Shard

Posted: 25 Mar 2010, 11:09
by zwzsg

Code: Select all

math.randomseed( os.time() )
Will seed the same random generator if you restart the game within ten seconds (very approximately) due to rounding errors on very large numbers such as "seconds since 1970".

I just need to port NTai's TDF config to Shard's taskqueues.lua if I want it to play KP, right?

But this begs the question:
This is possible because Shard searches for each file it has by first checking a subfolder to see if a game specific version is provided. This way you can override any part of Shard, add to Shard, or build entire AIs on top of it.
Which folder do I put mod-specific overrides in?

Re: Shard

Posted: 25 Mar 2010, 12:43
by AF
There is a subfolder called ai, inside which you will find all the lua files that make Shard tick.

So to override:

ai/taskqueues.lua

You would do:

ai/<modshortname>/taskqueues.lua

I will put an example in the 0.1.2 release tonight. My supervisor has also suggested I make a video introducing Shard, demonstrating its features, and showing how to use it.

And again, if I were to release the source code for the shard skirmishAI.dll, there is a very good chance I would be pulled up infront of a board of university staff for horrible horrible things. I dont want to fail my final year!

Although once I have graduated I am sure I will open source it under a suitable license, most likely LGPL.

Re: Shard

Posted: 25 Mar 2010, 12:45
by zwzsg
Err, AI are technical and abstract. I don't want video, but a written user reference manual.

Re: Shard

Posted: 25 Mar 2010, 15:17
by Kloot
.

Re: Shard

Posted: 25 Mar 2010, 17:26
by hoijui
you mean.. your code is ugly so much, it could make you fail the exam, and a viable solution to this is: just not showing the code to anyone.
... and all will be fine?
Either that is a strange uni with lazy profs, or ...
i guess i am just too naive for the real world.

Re: Shard

Posted: 25 Mar 2010, 17:41
by KaiserJ
im pretty clueless with AIs but i was able to muck with the LUA files and make it behave the way i wanted, which was very cool!

now all i need are some decent build lists and we'll see what this badboy can do.

also i really have to stress that only noobs wait until they have 10 units before attacking; i would rather your AI played all-out balls-to-the-wall style games.

anyways its awesome and i can't wait to see what this AI is capable of.

Re: Shard

Posted: 25 Mar 2010, 18:19
by AF
Overriding attackhandler.lua would be enough for that

Also my supervisor says so. Would you publish the source code for coursework a week before the hand in date under a license allowing everyone else in your course to pick and choose what to steal for their own?

Re: Shard

Posted: 25 Mar 2010, 19:18
by hoijui
yeah.. that is an argument i guess :D
are there others in your course working on a Spring AI?

Re: Shard

Posted: 25 Mar 2010, 20:08
by AF
Not that I'm aware of, but my supervisor says its a big no no anyway, I'd rather not upset him at this stage

Re: Shard

Posted: 25 Mar 2010, 20:32
by SinbadEV
AF wrote:Not that I'm aware of, but my supervisor says its a big no no anyway, I'd rather not upset him at this stage
Warning, The Following Blue Block of Text is Uninformed Opinionated Ramblings.
University Professors maintain tenure based on getting credit for their work... in some cases, as the supervisor on a students project, if the project is awesome enough, the professor may wish the project to be publish or presented at a conference with said professor receiving part of the credit for the project(they were your supervisor while you did the work after all)... regardless, this mentality of wanting credit for work tends to colour their view of Open Source stuff... it is to your benefit in the world of academia to make your research/work publicly available, but only in a way that ensures people KNOW you did it...

I'm just babbling here but basically for all intents and purposes I think it's wise to wait until at least after you've presented your work (is this a thesis project or just course-work BTW) officially before releasing the source publicly... which we would all be glad to see happen in due time.


Also, I'm glad to see something like this come out of you again.

Re: Shard

Posted: 25 Mar 2010, 22:28
by AF
Its a final year project/thesis of sorts. Only a Bac degree mind not a phd