Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Aug 21, 2018 4:08 am

All times are UTC




Post new topic  Reply to topic  [ 73 posts ]  Go to page Previous 1 2 3 4 Next
Author Message
 Post subject: Re: CivilAI
PostPosted: Tue Sep 30, 2014 5:15 pm 
Offline
Engineer
Engineer
User avatar

Joined: Mon Jan 31, 2011 4:51 pm
Posts: 99
Location: Farming stuff
planetmaker wrote:
Did you in install the AI using the ingame content download?

You're missing one of the required libraries, road pathfinder in version 4.

I did, and it worked just fine the last time I tried. Only today did it start disagreeing with me. I'll redownload it and see if it fixes it.

EDIT: Nope, it still crashes with the same error.

EDIT2: Downloading the library manually solved the problem. I'm guessing there's a missing dependency somewhere along the line?


Top
   
 Post subject: Re: CivilAI
PostPosted: Thu Oct 23, 2014 9:44 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
I often see this happenning(screenie)with your great CivilAI...should i report it as a bug ? it s not completely locked...but it s pretty far from optimal as they all struck each others and probably make an average speed of 2 or 3km/h...

Also when replacing vehicules, it seems to keep the old in the depot quite a while.

also, even though i setted the town to serve from minimum 500 pop, it doesn t serve many....the second town to have service waited 50 years of service

and last, but i suspect it s wanted behavior, this AI never make bus network, or try to make an intercity connection to the towns and cities i serve already...even sometimes town where i only deliver food and do nothing else there. so is that intented ?

anyway, other than that i find it really good at linking town by road, good job on that.


Attachments:
Marnham Transport, 14 Mar 2096.png [394.83 KiB]
Downloaded 7 times
Top
   
 Post subject: Re: CivilAI
PostPosted: Mon Feb 02, 2015 6:20 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
sorry for the bump, i have a feeling that pikka probably never seen my last report...so here is one more report for the same problem in a hope to see a fix to this gridlock made by civilai's bus.

also i have a few question : how CivilAI decide to make intercity service ? it seems to always fails to set any intercity lines in my games. It also seems to fail often at creating "inner city" bus network as after 100 years, my civilAIs tend to serve around 2/3 towns/city (i use some newgrf or settings that makes it harder than a vanilla game maybe ? ). As an exemple, even setting lower population to start creating a network don t make the AI more "activ".


Attachments:
CivialAI bug 1.png [370.04 KiB]
Downloaded 6 times
CivilAI bug 1.2.png [350.5 KiB]
Downloaded 6 times
Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Feb 04, 2015 7:54 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
That's quite a mess. :) Perhaps I can add some more sensibility checks - on the other hand, clogging up the inner cities with traffic is kind of the point of this ai. In the meantime, perhaps reduce the maximum number of buses the ai is allowed to build?

To the other question, the ai "plays nice" and will not build buses in towns which already have reasonable passenger services.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Feb 04, 2015 10:01 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
thanks for the answer Pikka,

about limiting max number of bus, i avoided that solution because "i wanted" to see the civil AI taking care of many "city/town" or "intercity" service.

about the traffic jam result of "entraffic" roads, well if the bus were full of passenger i d probably think that traffic jam are normal results...but here there is way too many bus for the demand (and capacity of roads). The Ai seems to not adapt number of bus to the "demand" (wich would be damn nice if it did).

just to be more clear on how this bug might happens, it takes a really long time ingame (i d say around 100years) to see the bus gridlock (ai need to have made quite a bunch of money before it happens...and turning off or having a very low infra road cost is necessary to see it happens, otherwise the AI goes bankrupt before reaching that point)

and thanks for clarification on the limititation of the AI to build in "already serviced" towns.

now is here a few other bugs i ve seen with CivilAI:

- i ve seen AI building their HQ in cities and then not being able to build a depot... this seems to happens when the ai choose a town that don t have a "road" piece on the town seed tile (one tile under the name). -> problem with that is the AI stay for years before bankrupting (it s says in its name it failed though) and "relaunching" this AI is no solution as the AI will pick up the same town to start with (the one with most population on the map and not yet serviced) . solution to this problem is to build manually the road on the seed tile, or to demolish a few building (reducing pop to not be the largest unserviced town) Then relaunch the Ai.

- old vehicles are sent to depot but not sold on arrival...they stay there for really really long time (I m not sure they are even selling them at some point)

- it picks always the bus with the max capacity, would be nice it was a bit more "random" or even better adapted to the number of passenger produced per town (i don t think towns producing 200 passengers needs to start with 4 bus with over 200 of capacity each )

- the intercity lines never get set up in my games.... is there a " max distance" limit ? a minimum population for the two towns that would be linked via intercity bus ?( i understand it don t pick the town i service, but there is really plenty of unserviced towns or cities in my game.)

- probably a few more things i forgot right now and dont have time to think about, but i will report back when i get time ;)


Top
   
 Post subject: Re: CivilAI
PostPosted: Thu Feb 05, 2015 5:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
here is one more strange behavior , the max number of bus this AI should have is 500 bus..I haven t touched that setting since the AI started so i wonder what s happening.


Attachments:
CivilAI Maxbussetting bug.png [400.81 KiB]
Downloaded 4 times
Top
   
 Post subject: Re: CivilAI
PostPosted: Thu Feb 05, 2015 5:34 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4660
Location: home
Company merger?

_________________
Being a OpenTTD developer does not mean I know what I am doing.
Also, other OpenTTD developers may have different opinions.


Top
   
 Post subject: Re: CivilAI
PostPosted: Thu Feb 05, 2015 5:38 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
nope no merge happened ;)
and most vehicles are stopped in the depot !
the others ones are strucked inside those massive traffic jam showed before :mrgreen:


Edit : i wonder if it s just because those Bus are so cheap to run that the AI just keep spamming them (they cost 38£ of maintenace per year, in other words next to nothing)

Edit 2 : the problem of multiplicating bus over the limit seems to happen at autoreplacement of vehicles. It buy a new one but don t sell the old one (in depot) and stop caring about the max bus limit of Civil AI. (look at vehicles number in company window inside the screenies )


Attachments:
File comment: Civil Ai claim that it won t build more bus... and then autoreplace starts
CivilAi multiplicatin bus 1.png [287.07 KiB]
Downloaded 3 times
File comment: number of max bus ? who cares ;)
CivilAi multiplicatin bus 2.png [266.61 KiB]
Downloaded 3 times
File comment: ok the banker said stop it s enough !! lol
CivilAI multiplicatin bus 3.png [298.28 KiB]
Downloaded 3 times
Top
   
 Post subject: Re: CivilAI
PostPosted: Fri Feb 06, 2015 12:48 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
romazoon wrote:
now is here a few other bugs i ve seen with CivilAI:

- i ve seen AI building their HQ in cities and then not being able to build a depot... this seems to happens when the ai choose a town that don t have a "road" piece on the town seed tile (one tile under the name).


Towns not having a road seed tile causes all kinds of problems (it prevents the town from growing) and only happens if a player or scenario builder has manually removed the tile. Currently the AI checks for this while road building, I'll add a check during initial town selection. I think I'll randomise the initial town selection a little too.

Quote:
- old vehicles are sent to depot but not sold on arrival...they stay there for really really long time (I m not sure they are even selling them at some point)


The AI has a couple of depot-cleaning cycles a year. However, if one of its other cycles takes too long it gets "distracted" and might miss a cycle. It's not that big a problem, is it?

Quote:
- it picks always the bus with the max capacity, would be nice it was a bit more "random" or even better adapted to the number of passenger produced per town (i don t think towns producing 200 passengers needs to start with 4 bus with over 200 of capacity each )


It picks the largest bus for local services and the fastest for intercity. Over 200 capacity is not "normal" for a OpenTTD bus.

Quote:
- the intercity lines never get set up in my games.... is there a " max distance" limit ? a minimum population for the two towns that would be linked via intercity bus ?( i understand it don t pick the town i service, but there is really plenty of unserviced towns or cities in my game.)

Intercity services are only established between cities which already have bus stops in them. Again, I can take a look at the criteria it uses to set them up. If you have a very large map (and I notice in your settings you have the maximum spread set much higher than default) this might also be the result of pathfinding taking so long that it skips other cycles.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Fri Feb 06, 2015 3:13 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
PikkaBird wrote:
Towns not having a road seed tile causes all kinds of problems (it prevents the town from growing) and only happens if a player or scenario builder has manually removed the tile. Currently the AI checks for this while road building, I'll add a check during initial town selection. I think I'll randomise the initial town selection a little too.


well they do are able to grow "nowadays", it s true in the oldtime though that seed tile were important, but now i think road can be somewhere around 3 to 4 tiles away from the seed and it s no problem for growth.
but now i guess you are right on the fact that i play a handmade scenario and there is probably a few towns that have seen change in their original road layout.
and yay for randomizing starting point ;)

PikkaBird wrote:
It's not that big a problem, is it?


no sure it s not a big problem, or is it ? the max bus limit will be hit sooner (ok it s not really caring of the bus in the depot so far, but i ve yet to see it reach max number of roadvehicles and maybe that will become a problem ?)

PikkaBird wrote:
It picks the largest bus for local services and the fastest for intercity. Over 200 capacity is not "normal" for a OpenTTD bus.


well that s a matter of taste mostly isn t it ? and since Cargodist is in trunk they are a necessity. At least for the players liking to connect many stations inside large towns. and while thinking about it, even your CivilAI would not be able to cope with the passenger it has to carry if there were not those "super heavy duty" bus from Ikarus set.

PikkaBird wrote:
Intercity services are only established between cities which already have bus stops in them


yes i think i found out, it need existing stops and many people waiting in them. i made a new test game with a few civilAi and seen at least once an intercity service getting built....and driving directly the company to bankrupcy because it could not handle the flow of people sent by cargodist and the trip was a huge detour for most of the traveller (no complain here just reporting what i see, i understand it s impossible to make an AI that deal with cargodist, so maybe an idea would be to make it a parameter, allowing the AI or not to set intercity services to avoid that problem).

and on the subject of max spread, yes i was hoping the civil ai to build all the roads for me on a 2048x2048 map :mrgreen: , but i reduced that in my test, and i effectively see a "more active" AI, building more roads and bus services with settings lower than 512.


Also i have a new question regarding using more AI at the same time, are they all sharing the opcode limit ? I use a scenario with 10000 opcode limit, and i was wondering if this could also impact on the effectiveness of the AI if there is not enough opcode because too many AI or too big maps.
And if there is an impact, if there is a way to increase that opcode limit in a running game ( i swear ;) i searched and found next to nothing about opcodes)


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun Feb 08, 2015 6:07 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Alright, version 4 is now on Bananas. I've addressed most of the issues you had but bear in mind that the point of this AI is to clog up the inner cities with traffic. ;)

Changes:

- Increase default network size from 256 to 512 tiles radius.
- Disallow setting up in towns with no centre road tile.
- Set up in a random town which meets the size and unserviced criteria, rather than the largest.
- Replace "monthly" tasks with a constant cycle. AI now builds faster and will not skip tasks.
- Tweaked conditions for building intercity bus routes to make them more common.
- Slightly reduced maximum number of buses per route to relieve city crowding.
- Added building small airports and air routes. Yes, really!

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun Feb 08, 2015 8:14 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
There was a small crash bug in version 4. There is now a version 5. :)

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun Feb 08, 2015 11:44 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
This is Awesome sir !!! Thank you very very much ;)


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun May 31, 2015 3:01 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
I've taken my somewhat naive coding style out for another spin. :) An update is now available on Bananas.

version 6:

Air network tweaks:
- Prevent building new airports too close to all existing airports.
- Redirect a few existing aircraft to newly built airports to refresh the air network.

Road network tweaks:
- Make our vehicle list nicer to look at by grouping cars and buses separately.
- Build a depot in large towns even if we're not building buses, to keep town cars spread out.
- Remove rail crossings and rebuild as bridges following collisions.

I think the next task is moving CivilAI into "proper AI" territory and building some trains. :) That's a big job though.

Next version I'll also take the no-random flag out, because it's a pretty competitive AI now I think - and also runs multiple instances quite happily.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue May 03, 2016 9:55 pm 
Offline
Traffic Manager
Traffic Manager

Joined: Thu Feb 26, 2015 12:52 am
Posts: 215
Hi. It survived my test of 100 years without crashing. There are some nasty bus jams, though. It seems to me that it would benefit better if it built bus stations near the outer edges of already large towns, it focuses in the inner center most of the time.

It is relatively slow and has a hard time starting up and making money. But it's still impressive to watch it slowly expanding the road network across the map.


Attachments:
Refingley Market Engineering, 1st Apr 1950.sav [456.16 KiB]
Downloaded 23 times
openttdCore6.cfg [10.77 KiB]
Downloaded 23 times
Refingley Market Engineering, 2051-01-26.png
Refingley Market Engineering, 2051-01-26.png [ 286.61 KiB | Viewed 1484 times ]

_________________
Formerly known as Samu
Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Apr 10, 2018 1:11 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
CivilAI version 7 is now on Banananananas.

This is a major update, and adds trucks and trains to the AI's repertoire, as well as tidying up a lot of its earlier behaviour. It should now be considered a "normal" competitive AI rather than a specialist oddity, although hopefully it's kept its general "civility" and pleasant construction style.

Changes in v7:

- Added better company and owner names.

Trucks added:
- CivilAI will now build trucks for mail, goods and food.
- Truck stops are added to busy bus stops for mail pickup and goods delivery.
- Supply depots are built near goods- and food-producing industries to supply cargos to towns.

Trains added:
- CivilAI will build short train lines to support goods- and food-producing industries, power plants, and water towers.
- Known issue: since (by design) the AI only builds non-electrified railways, it can't build default trains after the 20th century.

Air network tweaks:
- Increased the default minimum air route distance from 80 to 128 tiles.
- Made sure redirected aircraft are redirected from the correct airport.
- Improved land levelling for airport construction.

Road network tweaks:
- simplified the ugly "loop" built at outer bus stops - these never worked properly and were just clutter.
- Tweaks to when and how many vehicles are bought.
- Improve road network integrity by scanning for lost vehicles.
- Simplify crossing replacement code (which never really worked).
- More conservative network construction:
- Road network construction search now limited to towns the AI can build in.
- The AI will only expand the road network once it has built up the network it has, to avoid spending all its money on roads early on.

- CivilAI no longer funds roadworks, because that's not very civil.
- Various other tweaks and fixes.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Apr 10, 2018 1:06 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 884
Whoa, this is a very welcome addition, I need to try it :)


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Apr 10, 2018 1:33 pm 
Offline
Chairman
Chairman

Joined: Sat Jul 18, 2009 5:54 pm
Posts: 884
Seems very good so far!

First I accidentally started a game with FIRS (with OpenGFX+ Trains and Road Vehicles). The AI didn't scream at all, was working without problems. But when I realized it, I started a vanilla game.

Some highlights:
  • It reuses already existing train stations and rails! Cool!
  • I also really like the names it gives to its trains :)
  • No crashes whatsoever so far.

But: for some reason, all its trains have Kirby Paul Tank engines, even in 1987. Maybe the AI got its train valuator upside down?


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Apr 10, 2018 2:05 pm 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Brumi wrote:
But: for some reason, all its trains have Kirby Paul Tank engines, even in 1987. Maybe the AI got its train valuator upside down?


Hehe...

The AI likes little engines for its short railways. :) Obviously with the default trains, it doesn't have too many options.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Apr 11, 2018 3:10 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Well, a few people have downloaded the update and I've had no bug reports, so here's v8.

Changes:

- Added Water to the cargos to be trucked to towns.
- Cargo truck selection now prefers native vehicles over refits, like train wagons.
- Minor bug fixes.

_________________
Pikkarail.com blog | Patreon
Dev reference: NML Specs - NewGRF Specs - Savegame Internals - NoAi API - NoGo API


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

All times are UTC


Who is online

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