Convoy: train support testversion

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

User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Time for the daily update
Attachments
Convoy.tar
Convoy V10 16/01
(40 KiB) Downloaded 382 times
leaderfrontier
Traffic Manager
Traffic Manager
Posts: 132
Joined: 01 Aug 2008 03:58

Re: Convoy: the bus loving AI (V10)

Post by leaderfrontier »

Hello,i cannot get the Convoy Ai.
I have download and Extract to Ai files.And i found the Convoy Ai in Ai setting.But after i click it,it auto jump to Random Ai.
A smile everyday,keep fortune around.
Smile your life before sadness come. :D
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Convoy: the bus loving AI (V10)

Post by Yexo »

leaderfrontier wrote:Hello,i cannot get the Convoy Ai.
I have download and Extract to Ai files.And i found the Convoy Ai in Ai setting.But after i click it,it auto jump to Random Ai.
That problem was fixed in r15185
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Update to latest API change
Attachments
Convoy.tar
(60 KiB) Downloaded 1115 times
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Convoy: the bus loving AI (V10)

Post by planetmaker »

Hi,

I like to propose that you re-consider your version scheme as currently not the latest is selected when random AIs are selected (probably also when directly selected) and it happens to be yours. When starting OpenTTD, I get the following debug output:

Code: Select all

dbg: [ai] Registering two AIs with the same name and version
dbg: [ai]   1: /Users/ingo/Documents/OpenTTD/content_download/ai/Convoy.V10.tar/convoy.v10/main.nut
dbg: [ai]   2: /Users/ingo/Documents/OpenTTD/content_download/ai/Convoy.V10a.tar/convoy.v10a/main.nut
dbg: [ai] The first is taking precedence.
An obvious way around that is to delete the old version, but I'm sure there are plenty of users who don't see this output.

EDIT: it has also the effect, that people will constantly download your AI without actually using it: OpenTTD takes the first (old one), thus MD5 differs and allows download of the new which won't be used, so that it allows download of the new one and so on :)

Regards,
pm
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Done:renumbered to version 11, no functional changes. Yexo already warned me this could happen, so now I've updated it on Bananas
markzl
Engineer
Engineer
Posts: 30
Joined: 20 Jan 2009 01:58

Re: Convoy: the bus loving AI (V10)

Post by markzl »

hi,
how can i get v11? i do not have the internet & openttd on a flash drive will not update online content.

thanks.

EDIT: i found a few posts here, not countnig the 1st, that are v10, not v11.
Conditional Zenith
Chief Executive
Chief Executive
Posts: 697
Joined: 10 Jun 2003 00:19
Location: Australia

Re: Convoy: the bus loving AI (V10)

Post by Conditional Zenith »

There are a few things I can think of:

* Annoy the devs until they implement downloads from the website
* Have OTTD installed on some computer which has internet access and use it to download the content
* Ask someone to post it on the forums for you

In all cases you will need to manually put it into your content download folder (which is in a different place depending on which OS you use), and make sure dependencies are satisfied.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Ok, for those of you that don't use Bananas, here's the V11 version

It does use the roadpathfinder library, which in it's turn does use graph.aystar. You can find those in one of Yexo's recent posts, more specific, in this one http://www.tt-forums.net/viewtopic.php? ... 30#p770230
Attachments
Convoy.tar
(40 KiB) Downloaded 271 times
markzl
Engineer
Engineer
Posts: 30
Joined: 20 Jan 2009 01:58

Re: Convoy: the bus loving AI (V10)

Post by markzl »

thanks. i already have the libraries, which got the other 2 i downloaded yesterday to work, so im sure this'll work too.

thanks again.
defaultluser
Engineer
Engineer
Posts: 34
Joined: 01 Mar 2009 19:56

Re: Convoy: the bus loving AI (V10)

Post by defaultluser »

I've been playing several games with Convoy, and it always starts-out strong, then stops responding after 10-15 years. It just stops expanding, and stops replacing vehicles, even though it has money in the bank.

Please see my thread here on the subject (I've also been helping-out Morloth with NoCAB in that thread). I have posted save games so you can analyze the problem.

http://www.tt-forums.net/viewtopic.php? ... 86#p772286
defaultluser
Engineer
Engineer
Posts: 34
Joined: 01 Mar 2009 19:56

Re: Convoy: the bus loving AI (V10)

Post by defaultluser »

Okay GeekToo, thanks for your reply in my thread. Since the problems are acknowledged, I'll bring my questions back here.

So, my questions are:

When is Convoy going to get save support? And when is Convoy going to get the upgrade to replace vehicles? Both Admiral and NoCAB can do this, if you're curious.

The thing is, your AI is very impressive, but I have to leave it out of my games because I never play an entire game at one sitting, and I play all my games longer than 15 years.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

defaultluser wrote: When is Convoy going to get save support?
Even without save support, Convoy should continue building new lines. Only thing that it will not do is update vehicles on lines that already existed when loading the game. When it does not do anything after load, please check in the AI debug window, whether it is still Convoy that is running. If it is, please show some logging of the debug panel. It should not stop building anything, except when there's nothing more to build.

But when the load fails for some reason, a random AI may be started iso Convoy after the load.
defaultluser wrote: And when is Convoy going to get the upgrade to replace vehicles?
Very probably shortly after I implemented it. Autorenew does not seem very hard to implement, so I'll take a look at it for the next update. Save/load may be a little harder, I plan on doing that when I feel like it.

Currently I'm doing some severe restructuring on the Convoy code. I'm also thinking of adding truck support or train support. I've not yet decided what to do first
££asai0*saim
Engineer
Engineer
Posts: 11
Joined: 19 Mar 2009 02:43

Re: Convoy: the bus loving AI (V10)

Post by ££asai0*saim »

Hi GeekToo,
i just downloaded the AI Convoy and dont know whether its applied to my game and if its working does it work after a while like 2-3 years? it should disable other kinds of transport right? please could you tell me whether it would work or if theres something else i have to do. i have the openttd version 0.7.0-RC1 thanks
££asai0*saim
Engineer
Engineer
Posts: 11
Joined: 19 Mar 2009 02:43

Re: Convoy: the bus loving AI (V10)

Post by ££asai0*saim »

Is there any way of you the human controlled player making lots of money 15000 pounds or more just using buses per stop.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Convoy: the bus loving AI (V10)

Post by Zuu »

££asai0*saim wrote:Is there any way of you the human controlled player making lots of money 15000 pounds or more just using buses per stop.
A good thing about the new AI API is that AIs do no longer use cheats. Yet it is an AI, and thus have different processing capabilities than a human mind. A human is better to see patterns etc. but is bad on monitoring. A human is also much better on handling all the corner cases that can appear since it don't need to be programmed in advance.

But you should be able to make money using buses too. Just use them for the "right" distance etc.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

££asai0*saim wrote: i just downloaded the AI Convoy and dont know whether its applied to my game
Just check in the company window whether there's a company named Convoy(#n). Or in de Ai debug panel, which is in the menu under the red question mark.
££asai0*saim wrote: and if its working does it work after a while like 2-3 years?
... please could you tell me whether it would work or if theres something else i have to do. i have the openttd version 0.7.0-RC1 thanks
Make sure the max number of road vehicles > 0, and that opponents can build trucks. Furthermore you can set a specific AI in the AI settings window in the opening screen, and also the time after which the ai starts.
Or start a game, press the ` button (left of 1 button), type list_ai. You get a list of AIs the game sees, and you can start one with start_ai, followed by the AI name you want.
££asai0*saim wrote: it should disable other kinds of transport right?
No, it does not disable anything, it just is not programmed to use trains or planes.
££asai0*saim wrote:Is there any way of you the human controlled player making lots of money 15000 pounds or more just using buses per stop.
Like Zuu said, it does not do anything you can't, so if you study the game mechanics a bit, you should be able very well to make that amount of money with only buses.
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Just breaking the silence around Convoy, I want to show a little teaser of train support for Convoy.

It's currently giving nice profit, on a test map it did beat Admiral, and did keep up rather nice with NoCab.

It's using PBS, with double tracks, including switchpoints.

There's still a lot to do, but sometimes, even an AI author is surprised by it's own creation, and I wanted to share that with you. For the record, all trains in the lines in this picture are running OK, but I'm not sure whether I should like or hate this particular situation (of course, I picked an extreme case).
Attachments
Unnamed, 11th Jul 1993.png
Unnamed, 11th Jul 1993.png (366.46 KiB) Viewed 1205 times
Morloth
Transport Coordinator
Transport Coordinator
Posts: 378
Joined: 07 Feb 2008 14:06
Location: Glasgow

Re: Convoy: the bus loving AI (V10)

Post by Morloth »

Wauw! Looks rather good! Can't wait for a release ^^.

Best of luck with finishing your implementation!
User avatar
GeekToo
Tycoon
Tycoon
Posts: 961
Joined: 03 Jun 2007 22:22

Re: Convoy: the bus loving AI (V10)

Post by GeekToo »

Here's a big milestone for Convoy:

TRAIN SUPPORT !

I want to present you a test version of Convoy.
Currently it only uses trains, and no buses.

I want it to be as stable and bugfree as possible before merging with the bus version and balance that.
And that's where I need your help: the more testers, the better.

So what's not right with it yet:
-there's an occasional deadlock
-it does not replace engines with newer types of engines when they become available
-it does not yet have feeder buses, to completely drain all passengers from a town
-it does not have save / load support
-and a couple of more minor issues more (like going bankrupt when it fails to build it's first
line due to high construction costs ....).
-only one direction of stations
-incomplete / unclear logging messages

Before you think that it sucks completely, here's what is right about it:
-it outperforms Convoy on busses (depending on the map)
-passenger and mail support
-double rail tracks, with switch points
-pbs based
-modified pathfinder, to allow reuse of existing track
-state controller in the railline implementation
-I've already done a lot of testing, and it is pretty stable.
-Major restructuring of code, including splitting off multiple modules

So give it a try: put the tar in your content_download/ai directory.
Start a game, open the console with ` (next to the 1 key)
type: start_ai tconvoy
(mind the t in front of convoy, so they can run in parallel for now).

When I think it's mature enough (after all the bus Convoy took 11 revisions before it became what it is now),
I will merge the bus and train versions again, and put them on bananas.

Have fun!
Attachments
TConvoy.tar
(130 KiB) Downloaded 410 times
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 14 guests