OtviAI (version 423)
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 312)
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
- 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
-
- OtviAI.tar
- Version 372 (beta)
- (190 KiB) Downloaded 239 times
Re: OtviAI (version 312)
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: 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. I have attached the savegame. Anyway, I'm glad to see that there is another multi-profile AI coming, so keep up the good work!
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: 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. I have attached the savegame. Anyway, I'm glad to see that there is another multi-profile AI coming, so keep up the good work!
Re: OtviAI (version 312)
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.
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'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: OtviAI (version 312)
AroAI does that...you never complained about it there, and besides, it identifies the HQ of a particular companySirkoZ wrote:I can confirm Brumi's report. I otherwise do not like OtviAI, if for nothing more, than for its pompous HQ sign.
(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
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
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 312)
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?
Sirkoz: what kind of settings and newgrf's are you using so I can see what's going wrong?
Re: OtviAI (version 312)
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".
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'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 312)
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
P.S.: I assume you mean 90, not 60 degrees? I'm not sure whether my AI can handle 60 degree turns
Re: OtviAI (version 312)
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'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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
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
Re: OtviAI (version 379)
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 213 times
Re: OtviAI (version 379)
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)
Junctioneer (a traffic intersection simulator)
Re: OtviAI (version 379)
Crash! Division by zero error. I was away when the error happened, sorry.
- Attachments
-
- Sem nome, 11 Nov 1992.sav
- (178.8 KiB) Downloaded 201 times
-
- Sem nome, 11 Nov 1992.png
- (20.24 KiB) Downloaded 1 time
Re: OtviAI (version 379)
Problem with a connection by road.
- Attachments
-
- Sem nome, 1 Jan 1962.png
- (149.89 KiB) Downloaded 1 time
Re: OtviAI (version 379)
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
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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: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.
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: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.
It's a feature, not a bug Adds some fun 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 itSamu wrote: Another thing is OTVI crossing his own road with rail, making road vehicles from own company prone to accidents.
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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: zeroSamu wrote:Crash! Division by zero error. I was away when the error happened, sorry.
Thanks for spotting that bug! Will fix it.
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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).Samu wrote:Problem with a connection by road.
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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...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.
Re: OtviAI (version 379)
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.
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 (101.7 KiB) Viewed 7458 times
-
- Engineer
- Posts: 113
- Joined: 08 Aug 2008 11:35
- Contact:
Re: OtviAI (version 379)
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!
Who is online
Users browsing this forum: No registered users and 5 guests