Howto: beat AI

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
Roel
Engineer
Engineer
Posts: 9
Joined: 28 Jan 2009 22:20

Howto: beat AI

Post by Roel »

Hi,

A simple way to defeat current AI's is to build airports in the map's corners and transport passengers and mail. Next, build a couple of trains so all cargo types are transported.

A way to make it harder for yourselve is to disable airplanes:)

Thanks for your reaction.

Br,
Roel
Attachments
Roels.jpg
Defeat AI
(461.94 KiB) Downloaded 241 times
Last edited by Roel on 28 Jan 2009 23:03, edited 1 time in total.
Webhosting - http://www.ejac.nl
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Howto: beat AI

Post by Yexo »

What exactly do you want to say? That using (very) long aircraft routes makes lots of money? That has nothing to do with the AIs.

How much fun would it be to play against an AI that uses this strategy to make as much money as possible?
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Howto: beat AI

Post by GeekToo »

Roel,

That strategy would probably also beat most current humans, i.e. no fun.
To make it a bit more interesting is to rerun your strategy on a mountainous map, with a small number of towns and lot of industries. And using only one AI like Admiral iso having the AIs fight each other on the RV's.

But, you're right, it is an interesting question, how can humans beat the AI's. Questions like these stimulate the AI-developers to make (even) smarter AIs. And that is a good thing, it's more fun to play against an AI that behaves really intelligent, reacting upon it's environment.
A counter-strategy of the AI's could be to search for plane-stations, once they've got enough money, and build lots of passenger stations around it, and flood it with buses, obtain an excellent rating. That way the passengers would be drained away from the airfield, and the airplany company, having high costs, might have a problem.

So keep those AI beating strategies coming!

BTW, welcome to the forums :D
Roel
Engineer
Engineer
Posts: 9
Joined: 28 Jan 2009 22:20

Re: Howto: beat AI

Post by Roel »

Geekto,

Indeed. Maybe an idea is that an AI "learns" from human players. That is fun for beginners as wel as pro's:)

I've enabled all available AI's (downloadable from inside the game) I made the screenshot with that configuration.

Thanks!
Last edited by Roel on 28 Jan 2009 23:17, edited 1 time in total.
Webhosting - http://www.ejac.nl
Roel
Engineer
Engineer
Posts: 9
Joined: 28 Jan 2009 22:20

Re: Howto: beat AI

Post by Roel »

Yexo wrote:What exactly do you want to say? That using (very) long aircraft routes makes lots of money? That has nothing to do with the AIs.

How much fun would it be to play against an AI that uses this strategy to make as much money as possible?
Hi Yexo,

I mean that (very) long aircraft routes currently beat current AI's.
Webhosting - http://www.ejac.nl
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Howto: beat AI

Post by Zutty »

Roel wrote:
Yexo wrote:What exactly do you want to say? That using (very) long aircraft routes makes lots of money? That has nothing to do with the AIs.

How much fun would it be to play against an AI that uses this strategy to make as much money as possible?
Hi Yexo,

I mean that (very) long aircraft routes currently beat current AI's.
What about an AI that build's extremely long aircraft routes, eh?
PathZilla - A networking AI - Now with tram support.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Howto: beat AI

Post by Yexo »

Roel wrote:I mean that (very) long aircraft routes currently beat current AI's.
I understood that the first time. The question is now, what do you want to do about it? You want someone to write an AI that builds very long aircraft routes so it makes a lot of money? imho such an Ai wouldn't be fun to play against. If that's not what you want, then what do you want?
User avatar
trainmaster611
Traffic Manager
Traffic Manager
Posts: 222
Joined: 21 Dec 2007 16:33

Re: Howto: beat AI

Post by trainmaster611 »

Roel wrote:Geekto,

Indeed. Maybe an idea is that an AI "learns" from human players. That is fun for beginners as wel as pro's:)
I'm not too familiar with how OTTD works in particular but like all people, I have a general understanding of programming and AI logic, etc.

That's an interesting idea, but it doesn't really seem feasible. An AI could observe how you build stations but how you build a particular station might not work somewhere else. Likewise, the AI could misinterpret your actions and do something stupid (god knows what that would be) that it thinks is similar to your actions.

But an AI learning from humans? Sounds like something out of a Robots-that-have-learned-how-to-think-are-taking-over-the-world type movie :)
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Howto: beat AI

Post by Zuu »

Yexo wrote:
Roel wrote:I mean that (very) long aircraft routes currently beat current AI's.
I understood that the first time. The question is now, what do you want to do about it? You want someone to write an AI that builds very long aircraft routes so it makes a lot of money? imho such an Ai wouldn't be fun to play against. If that's not what you want, then what do you want?
There even is OverambitiousAI which can be found if one searches the original NoAI thread. It is probably not compatible with todays API but is probably not much more than a bunch of find replaces, and perhaps some thinking too. That AI used optimization to solve the travels salesman problem, but in reverse so that the route becomes the longest possible. This route was used as the aircraft orders. The main problem with this AI was that with too many airports it hit the maximum number of orders possible per order set in OpenTTD.

Another problem with that AI is that there is no license statement for it what I can find, even if the source is available. Have not tried to contact the author though.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Dimme
Transport Coordinator
Transport Coordinator
Posts: 277
Joined: 30 Jul 2008 12:42
Location: Trondheim, Norway

Re: Howto: beat AI

Post by Dimme »

Roel wrote: I mean that (very) long aircraft routes currently beat current AI's.
I see this as an issue with the game, and not the AI's. This was "fixed" by setting the plane speed down to 1/4 as standard, but many still turn it up again, as the slow planes look weird. Maybe other means for balancing should be made? NoAI gives an excellent opprtunity to balance the game by balancing the road, train, air and sea AIs against each other. For this case, maybe one should consider increasing the load/unload times for aircraft, making people have to wait some time between entering the airport and boarding (as in rl) (this time should of course be counted as travel time), or increasing prices on aircraft. Balancing also needs to be done between different sets that are meant to work together.

A more relevant question for this part of the forum is whether AIs should make use of such easy strategies. That is of course for the author to choose, but some human players may consider the AI stupid if it is so easy to beat.
Try my modular airports minigame!

Image
User avatar
CommanderZ
Tycoon
Tycoon
Posts: 1872
Joined: 07 Apr 2008 18:29
Location: Czech Republic
Contact:

Re: Howto: beat AI

Post by CommanderZ »

Learning AI? I hate learning AIs. I found bots in UT 2004 seem to learn tricks I used against them. That was the most annoying AI I ever encountered :lol:

But OTTD AIs using aircraft are pretty annoying too. I hate when AdmiralAI decides to start with Airplanes. Its incomes are then absolutely unmatchable with coal trains, even on 256*256 map.

I think some simple price multiplier GRF for aircraft would do the job far better that the speed factor. I mean 10* or so. Is something like this around (if not, is it possible to make it)?
User avatar
Zutty
Director
Director
Posts: 565
Joined: 22 Jan 2008 16:33

Re: Howto: beat AI

Post by Zutty »

trainmaster611 wrote:
Roel wrote:Geekto,

Indeed. Maybe an idea is that an AI "learns" from human players. That is fun for beginners as wel as pro's:)
I'm not too familiar with how OTTD works in particular but like all people, I have a general understanding of programming and AI logic, etc.

That's an interesting idea, but it doesn't really seem feasible. An AI could observe how you build stations but how you build a particular station might not work somewhere else. Likewise, the AI could misinterpret your actions and do something stupid (god knows what that would be) that it thinks is similar to your actions.

But an AI learning from humans? Sounds like something out of a Robots-that-have-learned-how-to-think-are-taking-over-the-world type movie :)
If you think of the A* pathfinder as a generative model, then could conceivably construct some kind of trainable cost function based on paths built by human players.

There would need to be some way of gathering data from the game and A LOT of data gathering (i.e. people building paths over and over) to get good enough samples, but it might work.

I'd love to see someone try this.
PathZilla - A networking AI - Now with tram support.
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 23 guests