Page 5 of 7

Re: CivilAI

Posted: 20 Apr 2019 16:43
by BW89
Bug: The AI builds Cargo Trains double.
Yes, both of the lines are carrying Grain
Kiel Transport, 11. Mär 1861.png
Kiel Transport, 11. Mär 1861.png (166.34 KiB) Viewed 5485 times

Re: CivilAI

Posted: 21 Apr 2019 00:42
by PikkaBird
BW89 wrote:Could you add a feature that the AI would add a Busstop in Villages when a IC bus would drive through it without stopping?
It would be possible, but I feel like growing villages is a little beyond Civi's remit. I'm also not sure how much I want to nerf intercity buses when I introduce passenger trains.
BW89 wrote:Bug: The AI builds Cargo Trains double.
Yes, I removed the code that stopped it doing that in the last version (because it was horribly messy) - I wasn't sure it was too much of a problem. But I can write a new solution.

Out of interest, did this happen on a relatively small map?

Re: CivilAI

Posted: 21 Apr 2019 08:29
by BW89
It was a 512x512 map with high amount of water.
Here a map with the industries.
Kiel Transport, 2. Jan 1864.png
(69.28 KiB) Not downloaded yet

Re: CivilAI

Posted: 22 Apr 2019 15:23
by rambolz
I ran into the same problem as BW89. The AI built the first route, then started thinking that it should find something else to connect to the drop-off station even before the first two trains had reached the water pump, and decided to build the same route again. This happened on a 256x256 map.

Re: CivilAI

Posted: 24 Apr 2019 18:56
by rambolz
I managed to break CivilAI in this savegame. It tried to connect to an existing station but connected to a totally wrong station and now it is doing something weird when looking at the AI debug screen. The train "George" is trying to get to the station which is not even connected.

Re: CivilAI

Posted: 24 Apr 2019 23:36
by PikkaBird
rambolz wrote:I managed to break CivilAI in this savegame. It tried to connect to an existing station but connected to a totally wrong station and now it is doing something weird when looking at the AI debug screen. The train "George" is trying to get to the station which is not even connected.
I had that happen once during testing, but couldn't reproduce it. Consider it an "open investigation".

Assuming the AI doesn't go bankrupt in the meantime, it can recover from the situation - after the train has lost money for two years, it will send it to the depot and sell it, then remove the misconnected station and line.

Re: CivilAI

Posted: 25 Apr 2019 20:16
by baysupercool
The ai chashed while trying to buy a ship even though there are no ships

Re: CivilAI

Posted: 15 Jun 2019 07:07
by andythenorth
Nice trains it's building :)

Re: CivilAI

Posted: 30 Jun 2019 09:00
by andythenorth
Entertainment unbounded :)

Re: CivilAI

Posted: 01 Jul 2019 06:13
by PikkaBird
andythenorth wrote: 30 Jun 2019 09:00 Entertainment unbounded :)
Hey, it works, doesn't it? ;)

Bit busy for OpenTTD stuff at the moment, I'm afraid. The bugs are being noted, I'll be back!

Re: CivilAI

Posted: 20 Sep 2019 21:06
by Wormnest
CivilAI crashed, not sure when since I had it running in the background. Not sure how useful a savegame is in this case, I have it if you need it. Older version of the savegame is posted in the EmotionAI thread.
Error: Cannot iterate null, see screenshot.

Re: CivilAI

Posted: 17 Dec 2019 22:28
by xarick
Your script made an error: parameter 1 has an invalid type 'null' ; expected: 'instance'

Re: CivilAI

Posted: 18 Dec 2019 09:15
by PikkaBird
Thanks both. I'm currently working on v20 and both crashes have been fixed.

Re: CivilAI

Posted: 24 Dec 2019 23:23
by PikkaBird
Merry Christmas from CivilAI!

Version 20:
This huge update introduces passenger, mail, food and goods trains, and tidies up and reworks existing features to make CivilAI faster and better than ever before!
Please report any crashes or odd behaviour!

Features:
Trains:
- Added passenger and mail train networks.
- Rewrote passing places / double track line construction to be tidier and more reliably buildable.
- Rewrote disused track removal code.
- Added dynamic railtype selection, instead of always building standard rail.
- All locomotives will be considered when building a new rail line and the rail type chosen accordingly.
- When adding a new connection to an existing line or replacing an old locomotive, all compatible locomotive types will be considered and the line upgraded if necessary.
Road Network:
- The option to not build an intercity road network added in v19 has been removed. The AI now always uses a hybrid behaviour.
- AI will only build road connections when it has money to spare.
- AI will build in towns before it has a road connection.
- AI will build in towns it can't connect to with road but are within its sphere (eg on islands or across mountains).
- The AI will not build intercity buses unless both trains and aircraft are disabled.
- Buses in towns will now transfer passengers to train stations and airports if cargo distribution is disabled.

Tweaks:

Road Network:
- Adjusted pathfinder settings once more to (possibly) reduce building duplicate/messy roads between towns.
- Reduced the number of stops at the town's central station from 3 to 2.
- Towns where bus network construction failed no longer count as unserviced against road network expansion.
- AI will check mail acceptance of stops before building mail trucks.
- AI will remove disused goods truck pickup stops.
- AI will check the ground is flat before trying to build a goods pickup.
- If the AI's home depot gets cut off, it will attempt to rebuild it before giving up and entering its fail state.
Aircraft:
- AI will build airports much more speculatively, to improve the chance of starting air service early in the game.
- AI will not build airports if the maintenance cost would exceed its income.
- AI will not build airports if it can't afford aircraft and/or no aircraft are available.
- New sanity checks when levelling land for airports, to avoid flattening mountains.
- AI will build mail planes between airports which have lots of mail but not many passengers waiting.
- AI will not build additional aircraft on unprofitable routes.
Trains:
- Double-cargo connections (eg grain and livestock to a factory) will now build one train for each cargo.
- Added a delay to building second lines to a station, to avoid double-connecting the same producing industry (reported by BW89).
- New sanity checks when levelling land for stations, to avoid flattening mountains.
- AI should now build more powerful locomotives when replacing old trains on hilly routes.
- Adjusted the big/cheap/fast bias scores for locomotive selection.
- Adjusted wagon selection.
Ships:
- Only one dock will be built per station (since more than one is now possible in OpenTTD 1.10).

Bug fixes:
- Fixed second cargo lines being built to the wrong terminus station (reported by rambolz).
- Fixed potentially stranding withdrawn trains by removing tracks prematurely.
- Fixed crash when attempting to cost a ship with no ships available (reported by baysupercool).
- Fixed crash when planning a train route if the target industry gets removed mid-plan (reported by Wormnest).
- Fixed the AI getting stuck trying to demolish an airport with a plane stopped in the hangar.

Re: CivilAI

Posted: 25 Dec 2019 00:09
by PikkaBird
And already... ;)
Version 23:
Bug fixes:
- Removed empty file that was breaking content service download.
Trains:
- fixed the AI removing bridges or other infrastructure when building a passing place.

Version 22:
Tweaks:
Road Vehicles:
- Improved detection for city truck stops which accept food or goods.

Bug fixes:
- Correctly updated version number in-game.

Version 21:
Bug fixes:
Road Vehicles:
- Fixed road pathfinder not reporting success, leading to failure to buy goods trucks (oops).

Re: CivilAI

Posted: 25 Dec 2019 13:02
by andythenorth
Hurrah :)

Testing testing testing.

Re: CivilAI

Posted: 25 Dec 2019 23:13
by andythenorth
Solid result: it's built a TGV for iron ore :twisted:

Re: CivilAI

Posted: 26 Dec 2019 01:10
by PikkaBird
Would it really be an AI if it didn't? ;)

One of CivilAI's 6 'personalities' loves fast vehicles and doesn't care about running costs. But perhaps I should make it think twice about locos which will be heavily restricted by wagon speed...

Re: CivilAI

Posted: 27 Dec 2019 05:33
by PikkaBird
Version 25:
Bug fixes:
Trains:
- AI will be more patient when building wagons, to avoid sending out short trains if it runs low on money.

Version 24:
Tweaks:
Trains:
- Added a bias against buying locomotives which will be speed limited by wagons.
- When adding new trains to a passenger line, slow old trains will be upgraded.
Road Vehicles:
- Cancel transfer orders for buses when withdrawing an air service or moving an airport.

Bug fixes:
Trains:
- Fixed AI failing to electrify rail lines (reported by andythenorth).
- Fixed rail placement errors in the passing place code.
- Added 90 degree turn detection to the passing place code.

Re: CivilAI

Posted: 31 Dec 2019 02:00
by 2TallTyler
What a bridge!

Image