OK, here it is: Convoy (the bus loving AI)TrueLight wrote:[
Now show us your AI and let us enjoy the moment too
-Uses buses only
-Pathfinding is 'curvy', straight roads would be better performancewise, but I don't like having only straight roads
-Completely written in Squirrel, no patches
-Compatible with r13219 (thanks for solving the passenger class problem)
-Since this week it is possible to use the tarloader to load the AI, so installation is extremely easy:
copy the tar to the bin/ai directory ( no need to untar ). Ready!
-To set up a battle load a scenario, or a new game ( if you're battling with Wright, choose a very flat map )
-Press the ` key (left of 1), and enter start_ai WrightAI <enter>, start_ai Convoy <enter>
-Press the ` again to close the console
Have fun !
I've chosen an iterative approach: first create a working AI that is playable, although many parts are not optimal.
So there's a rather long todo list still, but the AI should already be nice to compete against.
-Improve pathfinder: A* is not completely implemented, shorter routes on the openlist are disregarded
-Improve pathfinding on slopes, sometimes connections on slopes are failing
-Improve town coverage, only one station per town is build, add intratown lines
-Optimize time performance
-Line building: currently only unused towns are connected, which is ok for the first few years, but after that, no unused towns can be found, and connections between lines must be added
- more comments, use some requires
-My goal is not to create the best performing AI financially (I'm not taking part in any challenge), but to create an AI that human players like to play against. So remarks about the gameplay are welcome.
-Second goal: To improve my Object Oriention skills. I am pretty experienced in plain C programming, but in OO programming I consider myself a novice. So any comments on how to improve the OO design would be highly appreciated, I might learn a thing or two. And the best way to learn is to start doing it.
Don't know much about that, GNU GPL is fine I think. Meaning: feel free to use or modify any of my code ( a link would be nice ), or better, improve and republish it. I think it is be possible to create a nice AI by the OTTD community, using the best open source practices.
I thank TrueLight and Zuu: I re-used some functions of Wright and Clueless ( if that's a problem, I'll rewrite them, and yeah, I know, I should have asked beforehand )
The last version is available here: http://www.tt-forums.net/viewtopic.php?p=764906#p764906 , don't use the ones below anymore, they're obsolete because of API changes
Train support test version: http://www.tt-forums.net/viewtopic.php?p=787094#p787094