Today we started out with a new branch: NoAI. In this branch we will develop an AI framework that is available to everyone. We think the main reason why developing AIs is really hard in the current code, because you need to do so much core-stuff yourself. There isn't just a simple command to build roads, or to query this or that. So to make it all a bit easier for an AI creator, we are creating a thin layer in between. This layer supplies easy functions. With those, you should be able to build a good AI rather quick and in a clean way.
Besides that, we will be adding Squirrel support, a very lightweighted language that can be embed into OpenTTD and allows classes. This btw is not open for debate. Just so you know
![Wink ;)](./images/smilies/icon_wink.gif)
As we started out today, don't expect anything real for the next few days/weeks. In this thread we will keep you posted with progress. Feel free to give tips/suggestions/ideas, just remember that we already defined the idea pretty well. So please keep you tips/suggestions/ideas strictly to the current code.
When the code is good enough for users to start working on their own AI, we will release binaries via the compile-farm by then.
Till that time, I wish you much fun!
[Update 14 March 2007]
Today we finished up the Squirrel module, the language in which you can also write AIs. It is very similar to C++. It looks very promising so far. The first functions are also added, the AI can now take a loan and give his company a name. The rest of the week we take to add more functionality so it can at least do something. From that point on we will start giving you guys more concrete information like API documentation and more of that. Stay tuned!
[Update 16 March 2007]
After some initial problems and redoing some parts of the code, we are now finally at the stage that it all seems to work. Where we had initial the idea to run the function GameLoop every tick, we now run the function Start one time, and then your AI is just like a stand-alone application. Via Sleep() calls you can give control back to the main OpenTTD application. Any command that does changing (so not querying) does it automatically, to make the AI a bit fair, and allow multiplayer games.
Now this all must sound really interesting to you (not
![Razz :p](./images/smilies/icon_razz.gif)
![Smile :)](./images/smilies/icon_smile.gif)
[Update 18 March 2007]
As progress continues, we wanted to inform you that documentation is getting there. Check http://wiki.openttd.org/index.php/AI:Main_Page if you can't wait. Binaries will be produced as soon as win32 compatibility is restored (currently it aint broken, just not fully done
![Wink ;)](./images/smilies/icon_wink.gif)
![Smile :)](./images/smilies/icon_smile.gif)
[Update 24 March 2007]
Win32 support is now done. The API for making road AIs is done. Or anyway, the basics are. So, you should be able to start with your first AI. Of course important parts like pathfinders and simple tilelist filters are missing, which will be added in the next few weeks. But, the basics are there. So, if you like, download the upcoming binaries (should be there this week), and start building your AI. Report any problems here. Also if you have function requests feel free to post them. Just remind yourself that we might not agree, or already plan to do that. Have fun!
[Update 26 March 2007]
And finally it is there: binaries! You can get them here:
http://nightly.openttd.org/noai/scoreboard.php
It gives you a pretty nice set of API functions. Although you won't be able to do anything fancy with it, you can at least make primitive bus-routes. Soon more and more functions will be added, but this at least should get your on your way. If you detect any problems/errors/bugs, feel free to tell us about it! Have fun writing your own AI
![Smile :)](./images/smilies/icon_smile.gif)
[Update 4 May 2007]
As progress continued on a pretty nice rate, we didn't update this topic that often. If you want to read more about the progress, I suggest to follow http://devs.openttd.org/~truelight/blog/?cat=3
[Update 19 October 2007]
We might seem dead, but for sure we aren't. Because of lack of time and enthusiasm of the community, progress staled. Nevertheless, the current code is stable, and does allow you to make some pretty nice AIs. Lucky enough, slowly we see some enthusiasm coming up, which might just kickstart the progress again
![Wink ;)](./images/smilies/icon_wink.gif)
[After 19 October 2007]
We started to use the blog (http://blog.openttd.org) to keep track of NoAI updates, instead of updating this topic. Please go there to check the latest development. The NoAI branch is very much alive.