Jump to content
ramtzok1

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

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

Share this post


Link to post
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 (-_-)
  • Like 1

Share this post


Link to post
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?

 

Share this post


Link to post
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 (-_-)
  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×