Page 1 of 1

Way are my AIs "giving up"

Posted: 08 Mar 2009 17:55
by defaultluser
Okay, I played a game with many different AIs, and the Convoy and NoCAB were keeping pace with me for a long time, building massive road networks. But then, after about 20 years, the AIs stopped doing anything. They stopped expanding, and didn't replace ancient road vehicles that were %0 reliable. The AIs even had money in their accounts to replace the vehicles and build more networks!

NoCAB eventually recovered, but Convoy never recovered, and is still a dead weight. Hundreds of vehicles are stopped in depots, and hundreds more are limping along. I'm sure all the other AIs love this, because his broken-down fleet is clogging all the roads.

Can anyone figure what's going on here? I was just playing a regular game over several days with Beta 0.7, saving and picking it back up.

Re: Way are my AIs "giving up"

Posted: 08 Mar 2009 18:14
by Morloth
Hi defaultuser,

Thanks for testing the AIs, I'm glad NoCAB could keep up but you're right to state it doesn't 'upgrade' its existing connections and vehicles. It is something I'm working on this moment and should be fixed in version 2.0 of NoCAB. At the moment I also use a nondeterministic algorithm to determine which connection to build and due to its random nature it will overlook certain connections and might need a couple of tries before it finds them. In the beginning this isn't a problem as new connections are easy to find, but later on it will get more though. I'm currently working to improve this behaviour so NoCAB should be able to catch up much faster once I release the new version.

By any chance, do you have a save game / screenshots to show the results? I'm quite interested in the results of your experiment.

Thanks! :)

Re: Way are my AIs "giving up"

Posted: 08 Mar 2009 19:08
by defaultluser
Okay, now that I've looked back it's only Convoy that gave-up. The reason I misinterpreted is because Convoy was in the lead, and had hundreds of vehicles on the road; by giving-up, he stopped traffic for all AIs, so they couldn't compete. NoCAB did continue to upgrade their lines, but couldn't generate the revenue growth they had previously.

In the save I have attached, Convoy was matching me, and NoCAB 2 was on a steady growth. Then Convoy stopped replacing vehicles, and stopped spending money - he had 7 million in the bank as of this save, and a ton of older vehicles running.

Here is a screenshot and save game from 1970. Note that the large dip in my profits (blue) is from the recession. Could this have done something to Convoy?

Re: Way are my AIs "giving up"

Posted: 08 Mar 2009 20:23
by Morloth
defaultluser wrote:Okay, now that I've looked back it's only Convoy that gave-up. The reason I misinterpreted is because Convoy was in the lead, and had hundreds of vehicles on the road; by giving-up, he stopped traffic for all AIs, so they couldn't compete. NoCAB did continue to upgrade their lines, but couldn't generate the revenue growth they had previously.

In the save I have attached, Convoy was matching me, and NoCAB 2 was on a steady growth. Then Convoy stopped replacing vehicles, and stopped spending money - he had 7 million in the bank as of this save, and a ton of older vehicles running.

Here is a screenshot and save game from 1970. Note that the large dip in my profits (blue) is from the recession. Could this have done something to Convoy?
Thanks for the save game,

It could very well have been that the cities were already saturated and that would be a reason for Convoy to stop expanding. Remember that Convoy doesn't handle any connections between industries (yet?). It's spectacular to see how well Convoy handles cities and towns :).

I would like to advise you however not to use two of the same AIs in a map, in almost all cases the AIs will select the same industries / towns to server and will effectively compete each other to bankruptcy. I think each AI performs best on its own against other AIs / humans.

thanks again :)

Re: Way are my AIs "giving up"

Posted: 08 Mar 2009 20:33
by defaultluser
Morloth wrote:
defaultluser wrote:Okay, now that I've looked back it's only Convoy that gave-up. The reason I misinterpreted is because Convoy was in the lead, and had hundreds of vehicles on the road; by giving-up, he stopped traffic for all AIs, so they couldn't compete. NoCAB did continue to upgrade their lines, but couldn't generate the revenue growth they had previously.

In the save I have attached, Convoy was matching me, and NoCAB 2 was on a steady growth. Then Convoy stopped replacing vehicles, and stopped spending money - he had 7 million in the bank as of this save, and a ton of older vehicles running.

Here is a screenshot and save game from 1970. Note that the large dip in my profits (blue) is from the recession. Could this have done something to Convoy?
Thanks for the save game,

It could very well have been that the cities were already saturated and that would be a reason for Convoy to stop expanding. Remember that Convoy doesn't handle any connections between industries (yet?). It's spectacular to see how well Convoy handles cities and towns :).

I would like to advise you however not to use two of the same AIs in a map, in almost all cases the AIs will select the same industries / towns to server and will effectively compete each other to bankruptcy. I think each AI performs best on its own against other AIs / humans.

thanks again :)
That's great advice, but there are only so many AIs available for download. I had Admiral AI and PAX in the game I posted, but neither could compete. To be hones, PAX sucks unless you give it tons of seed money, and Admiral blows all it's money trying to do too many things at the start (several abandoned stations and construction attempts, including several train lines), and then always defaults to road vehicles once all the money is blown.

Do you know of any other AI worth my time? If so, how do you install them?

I suppose it would benefit me if I limited the number of AI and assigned them explicitly.

Re: Way are my AIs "giving up"

Posted: 08 Mar 2009 20:53
by Morloth
defaultluser wrote: That's great advice, but there are only so many AIs available for download. I had Admiral AI and PAX in the game I posted, but neither could compete. To be hones, PAX sucks unless you give it tons of seed money, and Admiral blows all it's money trying to do too many things at the start (several abandoned stations and construction attempts, including several train lines), and then always defaults to road vehicles once all the money is blown.

Do you know of any other AI worth my time? If so, how do you install them?

I suppose it would benefit me if I limited the number of AI and assigned them explicitly.
I'm afraid all AIs you can currently use are few. But if you want you can take a look at the latest SVN version of NoCAB, it has several improvements over 1.10 and is quite good (I think) on larger maps. So try it out on a 512x512 map and see if you can win from it :).

Good luck, let me know what happens 8).

P.S. To install it, drop it in your Documents/OpenTTD/ai map and delete the NoCAB folder there.

Re: Way are my AIs "giving up"

Posted: 10 Mar 2009 03:57
by defaultluser
Okay, I loaded your latest NoCAB, and played a game on Hard settings, 512x512. As a concession, I bumped-up the initial loan to $300,000, just to see if AdmiralAI would build trains, and also to see if PAX would SURVIVE.

My first update: 1956. So-far, it's been AdmiralAI vs NoCAB, and NoCAB is winning. AdmitalAI is building pure road vehicles, AGAIN. I'm impressed that NoCAB has built a shipping route, that's the first time I've EVER seen a TT AI do that :)

Unfortunately, the bountiful resources (and their aversion to trains) also mean that the AIs can't compete with me.

But we'll see what the future brings. Convoy has a solid first line built, and PAX has just entered the game. Hopefully, Convoy won't stop responding like in the last game. I'll play more tomorrow, and post more progress.

Re: Way are my AIs "giving up"

Posted: 10 Mar 2009 12:12
by Morloth
Not happy about it performance, but thanks for testing :).

A couple of tips though, set the setting 'Construction speed of compeditors' to 'Very fast'. This gives a boost to the speed of AIs which just might make a difference.

I've adjusted a couple of things in NoCAB, most notably its decision making speed and it now takes into account local authorities. I noticed you put the construction costs on high, which means that NoCAB will sometimes create a line without the chance to place road stations. But for your setup trains are very suited and I'm afraid my AI won't be able to compete unless I teach it how to use trains and that might take a little while :/.

Nonetheless here is the latest nightly, feel free to test it :).
- Bram

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 02:03
by defaultluser
Okay Morloth, I got a chance to play tonight. Same game settings, with SVN 271. I also added Fan AI just for a little more fun.

I also decided to start the game pure vehicles, then expand into trains later.

The AIs are keeping pace with me, except for the usual poor performance of PAX (And Fan, but it's new). NoCAB is doing very well, and is coming back from behind to challenge even Convoy :)

Convoy is destroying me, just like it has in previous games, but I will play this one through this time so I can see if it give-up again.

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 02:30
by defaultluser
An interesting development: in the game above, Convoy has already stopped responding. Take a look at this from 1961: three full years with no construction or expansion.

NoCAB is looking good though :)

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 02:42
by Morloth
I'm always a little confused by your screens. The name of the NoCAB company is always terminated with a '#2' which indicated there was another NoCAB AI earlier in the game. What happened with it of is it some kind of funny coding error on my part? :x

But thanks for your tests, will be very useful for the next release :).

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 07:12
by X_stream
A small reply from my part, I believe that some AI's (convoy maybe) don't have a working save/load function.
So when you save the game, exit and load it again later, those AI's may not be able to pick up again, and will do nothing instead.
Maybe this is an explanation for the "giving up" of some AI's.

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 12:01
by Zuu
If an AI stops after save/load then the author has added code that stops the AI from doing anything if it loads a game. This is a good thing I would say, as else without proper save/load code it would not remember its old routes or other information it stores that it is not able to read from the map.

The only AI I know that handles save/load is my PAXLink since I have designed it so it will not need to do anything in the save/load functions as it reads everything from the map using the API. The AI is more a test of a concept than a good working AI at least in terms of making profit. But also it doesn't make sure its airport stations are built properly from time to time. Neither does it check that the "grid bus stations" have a route to each other. It simply assumes that all road in a town is connected with all parts.

There might be other AIs that have implemented save/load that I am not aware of.

Re: Way are my AIs "giving up"

Posted: 12 Mar 2009 21:00
by GeekToo
Convoy does not do save /load ( Admiral does, I believe), but the funny thing is that when I load your savegame the yellow company is named Convoy, but in the AI debug window ( under the question mark), in fact it is another AI.
Maybe there was a problem when loading the savegame and a random AI started. If you're sure it is Convoy, could you show the AIdebug window, to show what the AI is doing? Because Convoy does not save/load, but it should continue constructing (provided some connections can be made). Renewal of vehicles is not (yet) implemented for Convoy.