NoAI Branch - An AI Framework
Moderator: OpenTTD Developers
NoAI Branch - An AI Framework
Dear AI freaks,
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
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 ), it comes down to: the interface is done, and the API is building up as we speak. So far we are really happy with the design, and we are sure you will be able to create your own AI really soon
[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 ). So... almost there
[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
[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
[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.
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
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 ), it comes down to: the interface is done, and the API is building up as we speak. So far we are really happy with the design, and we are sure you will be able to create your own AI really soon
[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 ). So... almost there
[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
[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
[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.
Last edited by TrueBrain on 04 May 2007 20:32, edited 6 times in total.
The only thing necessary for the triumph of evil is for good men to do nothing.
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
Re: NoAI Branch - An AI Framework
Isn't the naming of this branch a little counterintuitive, tho? When I first saw it, I thought the point of this branch was to remove any trace of AI from the game, not to create a toolkit/framework for it as something like "AItk" or "AIFW" would suggest.TrueLight wrote:new branch: NoAI. In this branch we will develop an AI framework that is available to everyone.
Just my 2 cents,
minime
Re: NoAI Branch - An AI Framework
A bit of irony is good for the general health Finding working names is one of the harder parts of codingminime wrote:Isn't the naming of this branch a little counterintuitive, tho? When I first saw it, I thought the point of this branch was to remove any trace of AI from the game, not to create a toolkit/framework for it as something like "AItk" or "AIFW" would suggest.TrueLight wrote:new branch: NoAI. In this branch we will develop an AI framework that is available to everyone.
Just my 2 cents,
minime
The only thing necessary for the triumph of evil is for good men to do nothing.
Finaly somewhere I can continue working on my Leviathan AI after openttd.gpmi kind of died. And the good part is, I was still doubting wether I should grab an extra copy of the OTTD source and start developing a new AI or not, I have now made my decision .
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone
- Born Acorn
- Tycoon
- Posts: 7595
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
Of course the idea is that in the end it will be merged with the trunk. But, there is a long road ahead of us before it is ready.Born Acorn wrote:Will this be coming to trunk with a few default AIs to show off the limits?
The only thing necessary for the triumph of evil is for good men to do nothing.
- Born Acorn
- Tycoon
- Posts: 7595
- Joined: 10 Dec 2002 20:36
- Skype: bornacorn
- Location: Wrexham, Wales
- Contact:
It will be possible. Bot-wars will be there.antichaos wrote:Will it be possible to have different companies run by different AIs in the same game? It would be great for people to be able to pit their AIs against each other.
The only thing necessary for the triumph of evil is for good men to do nothing.
Then we can make a competition for inclusion of the bots into a release, just like the scenarios. The criteria would then contain things like the way the tracks of the AI look, the way amount of damage to the surroundings, profitability etc :)TrueLight wrote:It will be possible. Bot-wars will be there.
- minime
- Transport Coordinator
- Posts: 339
- Joined: 18 Jan 2004 10:02
- Skype: dan.masek
- Location: Prague, Czech Republic
- Contact:
Re: NoAI Branch - An AI Framework
Yeah, tell me about it.TrueLight wrote:Finding working names is one of the harder parts of coding
Name aside, it's a good idea to address this long neglected area of development and I think it's bound to open up a lot of new options for the game. I'll definitely keep track of this project.
minime
Re: NoAI Branch - An AI Framework
I buy you beer (if the post man don't drink it)!!!TrueLight wrote:Dear AI freaks,
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
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!
- PouncingAnt
- Transport Coordinator
- Posts: 357
- Joined: 09 Nov 2004 22:33
Well, if there is going to be more support for AI programming, I'm definately up for doing some! I love AI. I just cant get my head round the code as it stands. Kudos to what you're doing, guys, it's far beyond anything I've attempted so far!
NB: the below challenges are still open for submission, so feel free to perform necromancy on them!
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4
Or try my scenario instead!
-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"
Patches:
Company Station Stats
Try the PouncingAnt National Monopoly Challenge
Or even better, the PouncingAnt National Monopoly Challenge 2
Or better still, the PouncingAnt National Monopoly Challenge 3
Or, the PouncingAnt National Monopoly Challenge 4
Or try my scenario instead!
-(A lazy) OpenTTD Japanese Translator-
-(A lazy) PNGcodec user-
"You get what you pay for, so pay attention!"
Patches:
Company Station Stats
Currently we are in the stage to proof our concept. By the looks of it, that will be done today or tomorrow. When it is done, we will start to publish documentation. So just hold on tight a little bit longerbrupje wrote:I couldn't find anything on the wiki on this subject. But is there a design available for review?
The only thing necessary for the triumph of evil is for good men to do nothing.
Any reason that it uses Squirrel as scripting though? Not that I mind the decision, I just never heard about that script-language.
Thought from what I see on Wikipedia, it's very C-like and should be quite easy to learn for most people working with C-like language. And it have brackets. (Which is very important for me.
It's exciting, as I always wanted to do my own AI but was kinda afraid to dig into the openTTD source just to get started. I also hope the AI will be developed to be MP safe. (though that might open up a need to have more than eight company slots )
Thought from what I see on Wikipedia, it's very C-like and should be quite easy to learn for most people working with C-like language. And it have brackets. (Which is very important for me.
It's exciting, as I always wanted to do my own AI but was kinda afraid to dig into the openTTD source just to get started. I also hope the AI will be developed to be MP safe. (though that might open up a need to have more than eight company slots )
Who is online
Users browsing this forum: No registered users and 7 guests