Format for providing options to AIs via script.txt?

Format for providing options to AIs via script.txt?

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

Moderators: hoijui, Moderators

Post Reply
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Format for providing options to AIs via script.txt?

Post by hughperkins »

Hoijui, (hmmm, a thread addressed to someone, makes me question whether this should be a thread, or rather an email!), don't suppose... what is the appropriate format for providing options to AIs via script.txt? (I only have springlobby, which doesn't seem to support these?)

I nearly hijacked your "Skirmish AI default conventions" thread to ask this, but then felt that that would be hijacking your thread ;-)
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Format for providing options to AIs via script.txt?

Post by hoijui »

hehe :D
you could also PM me here in the forum.
I though i though i would make a sticky thread later, with the AI conventions, when ppl agreed on some stuff.

to your question:
the start script format is described in the spring repo under:

Code: Select all

Documentation/SpringStartScript.txt
The AI part looks like:

Code: Select all

	// A skirmish AI (controlls a team)
	[AI0]
	{
		Name=name;     // [optional] pure info, eg. the name set in the lobby
		               // the name actually used in game will be:
		               // "${Name} (owner: ${player.Name})"
		ShortName=RAI; // shortName of the Skirmish AI library or name of the
		               // LUA AI that controlls this team.
		               // see spring.exe --list-skirmish-ais for possible values
		Team=number;   // the team this AI controlls
		Host=number;   // the player whichs computer this AI runs on
		               // eg. for [PLAYER0] above, this would be 0
		Version=0.1;   // [optional] version of this Skirmish AI
		[OPTIONS]      // [optional] contains AI specific options
		{
			difficultyLevel=1;
		}
	}
User avatar
hughperkins
AI Developer
Posts: 836
Joined: 17 Oct 2006, 04:14

Re: Format for providing options to AIs via script.txt?

Post by hughperkins »

the start script format is described in the spring repo under:

Code: Select all

Documentation/SpringStartScript.txt
Wow! Documentation :-O I was so impressed, I went and opened up gitk SpringStartScript.txt to find out who made it, figuring maybe it was you, and either it was, or you moved it from somewhere else, but either way, sweet!

You're doing some great things for Spring hoijui!
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Format for providing options to AIs via script.txt?

Post by hoijui »

:P
no was not me, but yeah, i renamed it (removed a space in its name, as it is not needed and makes life easier on *nix based systems.
I only updated the AI part of it.

but yeah ... documentation is rare in spring :D
With the Exception of TASServer. i am so impressed! i guess it was betalord who really did a great job with documentaiton. it is not only a lot, but actually usefull!
eg:

Code: Select all

// this call is blocking
instead of only stuff like:

Code: Select all

/** Return account object */
public Account getAccount() {
...
It Java, and now moved to git, under the same user as hte spring engine repo on github.
.. so nice to finnally work on a nice project again.. a nice language, clean stuff: only one language, no compiler or platform difference problems, clean simple build system, ...
Post Reply

Return to “AI”