AI directory changes

AI directory changes

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

Moderators: hoijui, Moderators

User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

AI directory changes

Post by jcnossen »

There have been a few changes in the AI directory structure for the next spring:

* Group AI dll's now located in aidll are moved to AI/Helper-libs
* Global AI dll's now located in aidll/globalai are moved to AI/Bot-libs (This in relation to TASClient which already calls the global AIs "Bots")

The idea is that AI/<AIname> can be used for AI data.
(AAI in svn is now AI/AAI for config files, NTAI is using AI/NTAI)
Last edited by jcnossen on 25 Aug 2006, 12:57, edited 1 time in total.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Multiple data directories support for AIs

(Assume cb is of type IAICallback *)

For the impatient

it works like this:

Code: Select all

void example_load_file(std::string filename) {
  char buffer[1000];
  strcpy(buffer, filename.c_str());
  cb->GetValue(AIVAL_LOCATE_FILE_R, buffer);
  std::ifstream ifs(buffer);
  /* read file */
}
For saving, replace AIVAL_LOCATE_FILE_R with AIVAL_LOCATE_FILE_W.

In depth explanation

You pass it (the cb->GetValue(AIVAL_LOCATE_FILE_*, ...) call) the filename (in a char buffer).

On Windows, it basically returns immediately and does nothing.

On Linux however, if you use AIVAL_LOCATE_FILE_R it looks for the file in all specified data directories, and prepends the datadir path (where it finds the file) to the filename in the buffer (so the call turns the path from relative to current working directory into an absolute path).

If you use AIVAL_LOCATE_FILE_W it prepends the path of the (only) writable data directory. Also it creates any directories in the filename you specify in case they don't exist yet.

Also it fixes slashes (turns them all into forward slash on linux, backward slash on windows), but that's a minor thing.

e.g. you pass it "AI/NTAI/foo" in the buffer, on windows you get back "AI\NTAI\foo", on linux you may get back something like "/home/user/.spring/AI/NTAI/foo".
User avatar
george1234
Posts: 17
Joined: 16 Jan 2007, 09:27

Post by george1234 »

jcnossen sais :
(This in relation to TASClient which already calls the global AIs "Bots")



Now i understand what Bots means
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I always thought we should have kept to Skirmish AIs and Helper AIs versus bot libs and helper libs. Much friendlier to people who arent tech saavy.
User avatar
Triaxx2
Posts: 422
Joined: 29 Aug 2004, 22:24

Post by Triaxx2 »

I thought Bots were for people to play games without actually playing them.

This forum could be much improved with a Quick Reply. I wish you'd quit playing with the releases. Every time I get close to something to release, you change versions.
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

"Bot" is more of an FPS term than an RTS one, yeah. "Skirmish AI" just says a lot more in this context.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

Its a completely unnecessary term imo, as it has no benefit and confuses noobs and is counter intuitive. Uusally noobs see stuff like "Add bot" in the battle window and dont realize it means add AI player and they get confused and ask in #main howto add AIs to games. Or they'll try to install an AI and get confused and put it in the wrong directory or give up.

The odd thing is that I originally added the folders "HelperAI" and "SkirmishAI" to the AI folder, but they where deleted and replaced by "Helper-libs" and "Bot-libs" by jelmer.

Maybe I should start a poll.
Icekiller
Posts: 2
Joined: 18 Jan 2008, 03:18

Re: AI directory changes

Post by Icekiller »

Every time i try to get ai i cant get it some one help me
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re:

Post by SinbadEV »

AF wrote:Uusally noobs see stuff like "Add bot" in the battle window and dont realize it means add AI player and they get confused and ask in #main howto add AIs to games. Or they'll try to install an AI and get confused and put it in the wrong directory or give up.
People are going to be stupid no matter what you call it, having folders with meaningful names that have the same names as they are referenced in game/lobby can only help... perhaps it's the client that needs changing.

Also Why Not Call them "ComputerPlayerAIs" and then instead of an add bot button have an "Add Computer Player"... make sure you make Mods called "Content Modules" while we're at it OK?

I'm too tired and burnt out from working all day to know if I'm being serious or sarcastic so assume I'm saying whatever I said in the way that least offends you.
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: AI directory changes

Post by SinbadEV »

Icekiller wrote:Every time i try to get ai i cant get it some one help me
Also this is offtopic you probably won't get a response, I'd suggest you post in the "Help" forum or under the release topic of whichever AI you are specifically trying to use.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AI directory changes

Post by AF »

Sinbad, that's what happened in AFLobby. Satirik and betlord simply ignored me and I dont know about spring lobby.

Suffice to say every single RTS engine I have ever tried has used the 'AI' terminology except spring. Only FPS and other nonRTS games have used the 'bot' terminology outside of spring, its totally counter intuitive for the end user, a gigantic user design flaw in my opinion.

What's even worse is that the spring engine uses the AI terminology internally, whereas it uses the bot terminology for the folders.

Infact the AI terminology was propose and used, then for no reason jelmer changed it from AI to bot in the svn, and that was it since he was lead at the time.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Re: AI directory changes

Post by Felix the Cat »

I think that the "bot or AI" terminology is a bit confusing, but isn't "gigantic design flaw" a bit melodramatic?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AI directory changes

Post by AF »

Hardly, I have at least 30 more extreme descriptions to use including horrific negligence, collosal boob, and most idiotic mistake of the century.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Re: AI directory changes

Post by jcnossen »

For a moment I thought you got over being a drama queen, but unfortunately you still are.

Bot or AI is a matter of opinion, it is certainly better than the global AI that it was called back then. IMO a bot is an AI component that actually represents a person playing, whereas a helper AI is a component that justs helps. That was the reasoning, maybe you can stop crying about it now.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AI directory changes

Post by AF »

I didn't realize you took it to heart so deeply jelmer, too much caffeine?
tombom
Posts: 1933
Joined: 18 Dec 2005, 20:21

Re: AI directory changes

Post by tombom »

AF wrote:I didn't realize you took it to heart so deeply jelmer, too much caffeine?
You have a tendency to complain about other people being nasty but you never seem to notice that you're a huge duck.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AI directory changes

Post by AF »

Ducks are pretty, but don't misinterpret every quack as a satanic ritual.
Last edited by AF on 21 Jan 2008, 21:05, edited 1 time in total.
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

Re: AI directory changes

Post by Peet »

AF wrote:Ducks are pretty, and most importantly they're rarely nasty!
They're also tasty with orange sauce.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: AI directory changes

Post by AF »

and now we get an analogy too.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Re: AI directory changes

Post by jcnossen »

i admit i had been drinking a lot of fake red bull, but i still think you were the one taking it too heart too deeply. oh well i dont care actually.
Post Reply

Return to “AI”