Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Nov 15, 2018 5:19 am

All times are UTC




Post new topic  Reply to topic  [ 126 posts ]  Go to page Previous 1 2 3 4 5 6 7 Next
Author Message
 Post subject: Re: OtviAI (version 312)
PostPosted: Tue Oct 05, 2010 4:59 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
The status has been upgraded from alpha to beta! Version 372:

- Major reordering of the code over more files
- bit of terraforming for train stations
- added generic transport class as superclass for trains/road en later water/air/trams
- 'intelligence' for determining what mode of transport to use (WIP)
- less stations, less depots
- can now handle modes of transport being disabled in openttd
- more elegant handling of multiple instances of the AI

Bring on the bugreports and suggestions :)


Attachments:
File comment: Version 372 (beta)
OtviAI.tar [190 KiB]
Downloaded 103 times

_________________
OtviAI
Rondje om de kerk (AI)
Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Wed Oct 06, 2010 5:51 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 886
Let me bring my bugreports:
I'm doing a test right now with OtviAI, SimpleAI and ChooChoo. OtviAI tried to use trains, but it didn't manage to build a connection for some reason. When removing stations, it leaves that little piece of track there:
Attachment:
Track left there.png
Track left there.png [ 19.2 KiB | Viewed 3808 times ]


Otvi is having financial difficulties in the game, although its routes are really profitable. It seems that it is spending all its money on terraforming.
Attachment:
Terraforming.png
Terraforming.png [ 111.77 KiB | Viewed 3808 times ]


I have attached the savegame.
Attachment:
SimpleOTVIChooChoo.sav [411.62 KiB]
Downloaded 95 times


Anyway, I'm glad to see that there is another multi-profile AI coming, so keep up the good work! :D


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Wed Oct 06, 2010 8:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
I can confirm Brumi's report. I otherwise do not like OtviAI, if for nothing more, than for its pompous HQ sign.

Anyhow - today I did run a test run with 1 SimpleAI and 1 Otvi - and again - Otvi managed just well to bankrupt itself out of the game and off my computer. :-)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Thu Oct 07, 2010 6:13 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
SirkoZ wrote:
I can confirm Brumi's report. I otherwise do not like OtviAI, if for nothing more, than for its pompous HQ sign.


AroAI does that...you never complained about it there, and besides, it identifies the HQ of a particular company
(I copied the HQ building code from Rondje, so i'll bet they're exactly the same as OtviAI)

on-topic...
train support? damn...AroAI could just about beat OtviAI-312 (in certain conditions)...
Congrats on getting it working, i've seen that getting train support to work is actually quite hard (see AIAI)

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Thu Oct 07, 2010 9:07 am 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
I fixed the small pieces of track getting left behind and also fixed trains deadlocking each other. I haven't witnessed otvi going bankrupt yet, except in cases where I was running 6 instances of otviai at the same time. The terraforming code is very preliminary untested code and well... it shows :) Will try to fix that before putting a release in bananas.

Sirkoz: what kind of settings and newgrf's are you using so I can see what's going wrong?

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Thu Oct 07, 2010 12:22 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
Well - I use just the old "Plane set" and of course only_decrease neutraliser new .GRF's. Otherwise difficulty settings are from "Hard", a few changed - veh_brkdowns:none, terrain:flat, lakes:verylow, econ:steady, disasters:off. All that with original map_gen, 60°turn enabled, towns:betterroads, all modes of transport enabled for AIs.

There are some other settings, that I do not think matter.

P.S.: "Z", not "z".

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Mon Oct 11, 2010 12:09 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
I don't see how those grf's would influence my AI, I'm not building planes yet and I'm rarely connecting oil wells. The original map generator makes it a bit more challenging though it seems :) But even then, with 2 OtviAI's running in a game with your settings, both survived. I will run some more tests of course, but at least these settings didn't showcase a clear bug in the AI.

P.S.: I assume you mean 90, not 60 degrees? I'm not sure whether my AI can handle 60 degree turns ;)

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 312)
PostPosted: Mon Oct 11, 2010 8:41 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 06, 2004 11:51 pm
Posts: 1494
Location: The sunny side of Alps
:lol: indeed - not 60° turns, rather ninety-degree. That 60km/h speed limit for those turns seems to haunt me. :)

_________________
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.

Keep 'em rollin'!


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 5:00 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
New release in bananas!

After lots of testing it's time for a release version again. What has changed since the previous release version in bananas?

- added trains
- added trams
- added generic transport class and mechanism to select a mode of transport for a given route, so adding aircrafts and boats is easy now
- more maintenance (removing unused stations, less depots, vehicle replacement, adding busses to an existing route, etc)
- newgrf support: not just trams, but also support for building nice looking cargo stations, ECS, FIRS, 2cc and more
- loads of small bugfixes and improvements (to prevent bankruptcy and being able to handle disabled trains etc)

So have fun with it!

Plans for the next release include:

- boats
- aircrafts
- less depots
- configurable parameters (like: option to go for maximum expansion or to go more player friendly, etc)
- more newgrf testing

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 6:32 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
Hi, the savegame shows OTVI with buses and a train (with 1 wagon only) competing in the same route. That would be ok, but the stations, bus and train in each town, are placed almost near each other and the 2 towns aren't that big. Also, while OTVI still makes a profit, from time to time I get the news showing it's going bankrupt, sometimes I even have the option to buy it. Another thing is OTVI crossing his own road with rail, making road vehicles from own company prone to accidents.


Attachments:
Sem nome, 30 Out 1956.sav [84.06 KiB]
Downloaded 95 times
Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 7:37 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4538
Location: /home/sweden
The good thing with AIs that don't bridge rail is that then CluelessPlus can demonstrate its algorithm to replace level crossings with road bridges. :-) This algorithm has also found its way into AIAI which has copied that code.

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 10:30 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
Crash! Division by zero error. I was away when the error happened, sorry.


Attachments:
Sem nome, 11 Nov 1992.sav [178.8 KiB]
Downloaded 91 times
Sem nome, 11 Nov 1992.png [20.24 KiB]
Downloaded 1 time
Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 11:00 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
Problem with a connection by road.


Attachments:
Sem nome, 1 Jan 1962.png [149.89 KiB]
Downloaded 1 time
Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Mon Nov 08, 2010 11:35 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Tue Apr 17, 2007 2:28 pm
Posts: 236
Some more problems. Look at those road pieces around the Battery farm, and look at the log, it keeps enabling and disabling the same town, trying to place either a bus or a train station there, but the local authority doesn't permit, yet it keeps terraforming near the town.


Attachments:
Sem nome, 17 Out 1980.png [151.45 KiB]
Downloaded 1 time
Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Tue Nov 09, 2010 9:53 am 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
Samu wrote:
Hi, the savegame shows OTVI with buses and a train (with 1 wagon only) competing in the same route. That would be ok, but the stations, bus and train in each town, are placed almost near each other and the 2 towns aren't that big.


In fact, the bus route is from A to B and the train route is from B to A (you can see this if you look at the orders). There is code in there to prevent the AI from building B-->A immediately after A-->B and from building A-->B again with a different mode of transport, but at the moment I'm not keeping track of all build routes, so preventing A-->B, C-->D and then B-->A is not possible at the moment.

Samu wrote:
Also, while OTVI still makes a profit, from time to time I get the news showing it's going bankrupt, sometimes I even have the option to buy it.


That's sort of inevitable if you try to expand quickly. Although I do try to avoid it by being more careful with my money after such a warning. I have some ideas left to further improve this.

Samu wrote:
Another thing is OTVI crossing his own road with rail, making road vehicles from own company prone to accidents.


It's a feature, not a bug ;) Adds some fun :P But especially with AI's like choochoo where you get double crossings and have a higher chance of killing a bus it might be a good idea to use bridges. I'll think about it :)

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Tue Nov 09, 2010 10:27 am 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
Samu wrote:
Crash! Division by zero error. I was away when the error happened, sorry.


It took me a little time to figure this one out, but as it turns out the AI was building a subsidized route near the end of the subsidy term. It checks the source and destination, takes a month or so to do the pathfinding and building and in the meanwhile the subsidized route ends. It then checks what cargo to transport, which doesn't work anymore, so you get 0xFF, then finds an engine for that cargo, which again doesn't work and then does division by the speed of that not existing engine: zero :)

Thanks for spotting that bug! Will fix it.

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Tue Nov 09, 2010 1:02 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
Samu wrote:
Problem with a connection by road.


By the looks of it, there was a working connection there, but then the vehicles didn't have enough profit and got sold and later the stations were removed as well to cut down on maintenance costs. Depots and roads are not removed (yet).

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Tue Nov 09, 2010 1:15 pm 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
Samu wrote:
Some more problems. Look at those road pieces around the Battery farm, and look at the log, it keeps enabling and disabling the same town, trying to place either a bus or a train station there, but the local authority doesn't permit, yet it keeps terraforming near the town.


Bug found and fixed. Thanks for all the testing Samu! Re-enabling towns will now not happen more then once a year. And I'll probably have to start checking how 'willing' a town is to receive some terraforming from the AI...

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Tue Nov 09, 2010 6:59 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 886
Bug report:

OtviAI built a point-to-point train route, but there are two trains on it (train 1 and train 3, so the other one might have been added later), and both trains are stuck at the station, waiting for a free path.


Attachments:
Unnamed, 8th Dec 1950.png
Unnamed, 8th Dec 1950.png [ 101.7 KiB | Viewed 3494 times ]
Top
   
 Post subject: Re: OtviAI (version 379)
PostPosted: Wed Nov 10, 2010 10:50 am 
Offline
Engineer
Engineer

Joined: Fri Aug 08, 2008 11:35 am
Posts: 107
Hmmmm... you're absolutely right, there is a bug in the track connection code, which lead to only half of the tracks getting connected. Fixed and testing... Thanks!

_________________
OtviAI
Rondje om de kerk (AI)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 126 posts ]  Go to page Previous 1 2 3 4 5 6 7 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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.