Jump to content

Bot developing - Where can I find documentation to make an AI


ramtzok1
 Share

Recommended Posts

Hello,

I want to program my own AI and eventually making ML from it but first I need to learn how to program an AI. I don't know where can I get documentation to see what common-api folder has to offer.

I read the tutorial "[Tutorial] Develop a new AI" but it really explains only about the basics of the main loop and how to initialize my bot.

It's unclear what files do I need to create and what does each prototype functions inside common-api.

Does anyone have a good source or a good documentation?

Thank you for your help.

(Sorry for my bad English)

Edited by ramtzok1
Link to comment
Share on other sites

10 hours ago, ramtzok1 said:

I don't know where can I get documentation to see what common-api folder has to offer.

Trac wiki being incomplete as usual.. :/

common-api are a bunch of code thats necessary for any AI. Things like, handling game events, terrain analysis and other such things which are fundamental components for an AI. It seems to be complete enough, that you can pretty much construct any kind of AI using it (That maybe a stretch), therefore its unlikely that you would ever need to change it. Its quite large to describe in one post, but the code is cery well organized so finding stuff wont be that hard.

Bots like Petra are designed with modularity in mind. For example, base management, economy management etc are handled seperately. And you can add any new module to the mix without much hassle. So, it maybe wise to build upon Petra rather than from the ground up.

Edited by Guest
Link to comment
Share on other sites

8 hours ago, (-_-) said:

Trac wiki being incomplete as usual.. :/

common-api are a bunch of code thats necessary for any AI. Things like, handling game events, terrain analysis and other such things which are fundamental components for an AI. It seems to be complete enough, that you can pretty much construct any kind of AI using it (That maybe a stretch), therefore its unlikely that you would ever need to change it. Its quite large to describe in one post, but the code is cery well organized so finding stuff wont be that hard.

Bots like Petra are designed with modularity in mind. For example, base management, economy management etc are handled seperately. And you can add any new module to the mix without much hassle. So, it maybe wise to build upon Petra rather than from the ground up.

9

Thank you for your answer!

Is there a way to debug petraBot to see how it works in an action?

 

Link to comment
Share on other sites

20 minutes ago, ramtzok1 said:

Is there a way to debug petraBot to see how it works in an action?

You can set the level of debug information available by modifying https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/ai/petra/config.js#L13

Also, if you want to get an idea of how everything fits together, the first place to look would be https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/ai/petra/headquarters.js

Edited by Guest
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...