Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sat Oct 20, 2018 9:43 am

All times are UTC




Post new topic  Reply to topic  [ 11 posts ] 
Author Message
 Post subject: [AI] RailwAI
PostPosted: Sun Jul 29, 2018 3:07 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
Hi all!

I am happily proud to present you a new AI called RailwAI. RailwAI is a best-effort, random behaving artificial player that can use ships, trains and road vehicles. Available through Bananas.
Some features of RailwAI:
- Build railway lines with 2 tracks (I hope you like the building style)
- Build roads, tramways and canals
- Use different types of available trains, bridges etc.
- Connect multiple cities on a single passenger line
- Executing building plans will be continued when loading a savegame
- Sometimes things go wrong (blocked canals, too long trains), RailwAI will hopefully try to solve the problem
- Support for (hopefully) a lot of NewGRF without creating weird train combinations (like, putting freight carriages behind a passenger unit)
- Behaviour is random. A company might go bankrupt when expensive vehicles are bought.
- It is called RailwAI, but it might have a preference for roads (because those are cheap)

Image


Last edited by RailwAI on Fri Aug 24, 2018 9:45 pm, edited 1 time in total.

Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Mon Jul 30, 2018 6:33 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
The AI was hardly transporting cargo in the intial version. I found a few bugs related to cargo, so I have pushed a second version to BaNaNaS.
Changelog of version 2:
  • Bus services should now always be between 2 different cities/villages, of which one is not too small.
  • Better search for suitable location to build a dock for ships
  • Faster switching from building 2 tracks over the full line to using 2 tracks partially
  • Bugfix: selecting a cargo type to transport now works properly
  • Bugfix: if ships are available, trains and trucks can still be used to transport cargo


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Mon Jul 30, 2018 7:50 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 03, 2002 10:36 am
Posts: 13178
Location: The Netherlands
This sounds cool, a realistic railway building AI that also uses different vehicle types. When I run into spare time I will surely check this out.

_________________
Image
Dutch Trainset for OpenTTD | Dutch Trainset Topic | Combined Roadset v0.10


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Wed Aug 01, 2018 9:58 am 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
Thank you. I am currently trying to make bus services and passenger train services between smaller towns more profitable, that will hopefully be the next update. It is rather hard to do so without timetables.


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Wed Aug 08, 2018 7:32 am 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
Version 3 is available. Changelog:
  • Bugfixes: more succes in building road tunnels
  • Bus stops within large cities will be less close to eachother
  • Road depots are built closer to a road station
  • More truck stations can be built around factories
  • Faster pathfinder for roads on longer distances
  • Loan is set dynamically
  • Old vehicles will be replaced or sold
  • Unused stations will be removed
Edit: forgot to correct a small mistake in the last mentioned feature. You can download version 4.


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Mon Aug 20, 2018 1:36 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
This AI is amazing!

Left it running in a heavily NewGRF'ed (FIRS and various vehicle sets) game, and I have not seen a single error so far! And it's very good to see that it's a multi-profile AI, ships are especially welcome :)

The only unusual thing I saw was that the AI built a really long canal right at the beginning of the game. And I was thinking, "How on earth did it not crash the company?", but then I saw that canal costs are lowered with SQUID significantly. The company was a success, obviously.


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Fri Aug 24, 2018 9:27 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
Thank you! It took me quite some time to develop something that I found ready for publication. I currently like it more to adjust some changes and watch a few AI playing openttd, than to play the game myself :P

Building a long route as the first route can be a large risk however. During test runs, I have already seen RailwAI going bankrupt when the cost estimation before was too low, but it will always depend on game settings. In your case, it was probably a bit of luck too.

Version 5 is now uploaded. The changelog:
- Bugfix: Reloading a game after the AI had crashed, sometimes caused the AI to immediately crash again
- Bugfix: Always use the corresponding rail type to build rails in front of a depot (instead of sometimes a different, compatible one)
- Bugfix: an unconnected station track was sometimes allowed
- Building less level crossings, as those often cause accidents when there is heavy road traffic
- Do not always reduce length of passenger trains, only if there will be not enough passengers
- Better re-use of existing canals
- When the company has enough money, it now can build statues


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Mon Aug 27, 2018 7:14 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 885
Found something that may be of interest to you:

Attachment:
railwAI_trams.png [186.77 KiB]
Not downloaded yet


The pink player (railwAI) tried to make a tram connection in the SW-NE direction. I don't know what happened here, but it is certain that some of the trams actually made it to the NE side. Does the AI try to avoid level crossings by building detours? I see that the AI is constantly trying to make adjustments to this route, but for some reason it fails to see that the tracks coming from the SW are not connected.

Savegame is attached.


Attachments:
railwAI_test_trams.sav [576.72 KiB]
Downloaded 18 times
Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Tue Aug 28, 2018 9:39 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
The AI is indeed trying to remove level crossings, because on those crashes can occur between road vehicles and trains. The disconnected tramway is a bug I knew of, and I was already working on that part of the problem. I don't see directly why it keeps failing to properly remove the roads. I'm definitely going to tackle the issue in the next update, thank you for the savegame.


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Fri Aug 31, 2018 9:36 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
If you now update the AI, it should stop panicking over the railroad crossings and most crossings will be removed.

The changelog for version 6:
- Bugfix: some corner combinations were not always allowed
- Bugfix: no more blocking of locks when building new canals
- Bugfix: selecting correct tiles when planning a detour for a railroad crossing
- No more weird U-turns ("large pools") in new canals
- Railway lines with single-track parts will take less time
- Removing dead-end roads built by the company
- Reconnect tramways that were accidentally disconnected (can happen when a detour is made for a railroad crossing)
- Cargo services cannot are not anymore allowed to pick up cargo at the drop off location
- Borrowing more money from the bank to buy a train, if required


Top
   
 Post subject: Re: [AI] RailwAI
PostPosted: Tue Sep 04, 2018 5:41 pm 
Offline
Engineer
Engineer

Joined: Sun Jul 22, 2018 8:30 pm
Posts: 11
Short changelog for version 7:
- Bugfix: no more accidental removal of tiles of a different station


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: d0mi3l and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.