Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Tue Aug 21, 2018 9:31 pm

All times are UTC




Post new topic  Reply to topic  [ 73 posts ]  Go to page Previous 1 2 3 4
Author Message
 Post subject: Re: CivilAI
PostPosted: Wed May 16, 2018 1:14 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4676
Location: Lost in Music
Much civil. Very AI :)

I've got two of them in my current game. Jazzes it up a bit.

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Jun 05, 2018 1:46 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1074
Is it possible to change company settings from the AI level?
I found AIGameSettings::GetValue, but not SetValue.
What I want to do is to change company setting to enable sharing depots (using IS patch).

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


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

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Quote:
What I want to do is to change company setting to enable sharing depots (using IS patch).


Not sure how this is related to CivilAI, but have you tried switching into the company (via the cheat menu) and turning on the IS options yourself?

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


Top
   
 Post subject: Re: CivilAI
PostPosted: Tue Jun 05, 2018 2:37 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1074
Sorry for hijacking your thread :)
The problem is, that I'm using CivilAI on my server, and it is not possible, AFAIK, to jump into AI in multiplayer mode,
therefore was my attempt to change AI code.
Saving game and restarting server with changed save is not convenient due to password issues.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Jun 06, 2018 12:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
Very nice to see that awesome AI get even better, Thank You Pikka !

Now i ve made some observation in a small test game :

- Choice of vehicle from AI is debatable, in my test, AI thought it s a good idea to use the very slow but high capacity vehicle from HEQS to transport Food. The vehicle loose money and the AI don t seems to care about it (it s sent to depot after loosing money for a moment, only to be replaced with the same vehcile), also it cause jams on the roads. I understand we can t avoid totally those jams with articulated vehicle, but maybe your AI could avoid selecting amongst the slowest vehicles when it intend to travel relatively far (in my game it choosed a slow vehicle to travel over 140 tiles (flight distance, i haven t counted the exact road distance). Imho those kind of vehicle should probably not be used for distance over 40 tiles.

Attachment:
Muir & Co., 17_01_1997.png [267.12 KiB]
Not downloaded yet


- Road construction from AI, i have been surprised on how the AI build a lot of roads for nothing, doubling existing ones, creating dead ends.... I would say it s not enough reusing existing roads, it tries to be more efficient that way i supose (but fails at it in a few cases). It makes some very ugly road.
Attachment:
Muir & Co., 17_01_1997#2.png [344.82 KiB]
Not downloaded yet

In this screenie all the doubling of road have been made by AI, and they are all useless. In the down right corner of the screen, it s two Civil AI competing to lay as most road as they can it seems...even though a "not owned road, from the scenario" was already going through there.

If you wanna test and see for yourself how Civil AI is not enough reusing existing roads imho, i ve done my Test in Cindini, wich does already have a relatively dense road network from start.


- Ships, lovely addition, but is full load really a good idea ? i think with cargodist being used full load should be avoided (i imagine nowadays the majority of players uses it)... but at the same time i can understand why full load is a good idea if cargodist is off (avoid that busses let not enough passengers for the ships).


I haven t seen much else wrong for the moment, and i ve been rather impressed by the couple trains lines some of the Civil AI have built, they seemed very reasonable for AI !


Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Jun 06, 2018 1:19 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1074
Once more about roads: seems that it have problems with connecting to bridges, many times I observed dead ends like in attached picture.
Another issue is, that AI cannot handle with sea shore, if removing of water is blocked (via patch or high base costs),
see left corner - unfinished route. Similar problem with bridges on sloped sea shore, it should start one tile earlier with higher bridge to avoid possible bridge building failure (such bridge also looks better without ships clipping glitches).


Attachments:
civilai-b.png [214.42 KiB]
Not downloaded yet

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.
Top
   
 Post subject: Re: CivilAI
PostPosted: Wed Jun 06, 2018 4:18 pm 
Offline
Engineer
Engineer

Joined: Wed Mar 07, 2018 5:00 pm
Posts: 45
romazoon wrote:
- Choice of vehicle from AI is debatable, in my test, AI thought it s a good idea to use the very slow but high capacity vehicle from HEQS to transport Food. The vehicle loose money and the AI don t seems to care about it (it s sent to depot after loosing money for a moment, only to be replaced with the same vehcile), also it cause jams on the roads.

Yes, these crawlers seem to be a popular choice among AIs (not only CivilAI), which is why I only enable the core vehicles and trams of HEQS when playing with them.

By the way, when playing with DBSetXL, CivilAI chooses two different wagon types for the same train. It's not a big problem since both can load the same amount of wood, I just found it funny and don't know if it is intentional.


Attachments:
DB AIs, 22nd Jan 1962c.png
DB AIs, 22nd Jan 1962c.png [ 190.42 KiB | Viewed 1284 times ]
Top
   
 Post subject: Re: CivilAI
PostPosted: Fri Jun 08, 2018 11:57 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
McZapkie wrote:
Another issue is, that AI cannot handle with sea shore, if removing of water is blocked (via patch or high base costs)

I'm not sure it's reasonable to expect the AI to cope with arbitrary base cost changes, much less patched versions of OpenTTD. It's a road building AI and will struggle in an environment hostile to road building. That said, I suspect setting buildroad.cost.coast to a high value at line 2191 might help.

romazoon wrote:
- Choice of vehicle from AI is debatable, in my test, AI thought it s a good idea to use the very slow but high capacity vehicle from HEQS to transport Food.

I hadn't considered HEQS when testing - I can certainly tweak the vehicle selection code to avoid such wide outliers. :)

romazoon wrote:
- Road construction from AI, i have been surprised on how the AI build a lot of roads for nothing, doubling existing ones, creating dead ends.... I would say it s not enough reusing existing roads, it tries to be more efficient that way i supose (but fails at it in a few cases). It makes some very ugly road.

Pathfinder values are always a difficult balancing act (and "ugly" is in the eye of the beholder). The AI does do a lot of rechecking connections, and this can result in some duplicated roads. You could try tinkering with buildroad.cost.no_existing_road at line 2168, and see if you can find a value that produces more pleasing results.

romazoon wrote:
- Ships, lovely addition, but is full load really a good idea ? i think with cargodist being used full load should be avoided (i imagine nowadays the majority of players uses it)... but at the same time i can understand why full load is a good idea if cargodist is off (avoid that busses let not enough passengers for the ships).

Very short ('water-bus' style) ship routes don't use full-load. For the longer routes, they're more analogous to aircraft - they're better off sitting raising the station rating than zooming back and forth empty. Cargodist or not, full-load or not, ships rarely make the AI much money; the ships, and the AI in general, are primarily to create pleasant background movement for human players, rather than to play the game as efficiently as possible itself.

vrn wrote:
By the way, when playing with DBSetXL, CivilAI chooses two different wagon types for the same train. It's not a big problem since both can load the same amount of wood, I just found it funny and don't know if it is intentional.

Yes, it's intentional - the AI will build mixed trains (if more than one suitable wagon exists) for piece cargos like wood.

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


Top
   
 Post subject: Re: CivilAI
PostPosted: Fri Jun 08, 2018 12:17 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1074
I got client crash with following error:
Code:
Error: Assertion failed at line 281 of ~/JGR/src/ai/ai_core.cpp: c != NULL && c->ai_instance != NULL

Not sure if it should be report to JGR patch maker, seems that is is AI related?

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension.
Addicted to freeciv longturn.


Top
   
 Post subject: Re: CivilAI
PostPosted: Fri Jun 08, 2018 6:18 pm 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
McZapkie wrote:
Not sure if it should be report to JGR patch maker, seems that is is AI related?


I don't know, but there's certainly no point reporting it to me.

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


Top
   
 Post subject: Re: CivilAI
PostPosted: Sat Jun 09, 2018 12:37 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sun Jun 20, 2010 11:16 pm
Posts: 1254
thanks for the answers ;)

PikkaBird wrote:
Pathfinder values are always a difficult balancing act (and "ugly" is in the eye of the beholder). The AI does do a lot of rechecking connections, and this can result in some duplicated roads. You could try tinkering with buildroad.cost.no_existing_road at line 2168, and see if you can find a value that produces more pleasing results.


of course "it s ugly" is as subjective as it can be and that s not a point i should have raised, inneficiency would have been a more proper term i guess...anyway you knew what i meant i think.
Now i d love to try tinkering a bit with this value, unfortunately i think would not know where to look for this value so i guess i ll just hope someone find pleasant settings and share the customized AI then ;) (or is that value modifiable in game with an AI developer setting turned on ? )

PikkaBird wrote:
Very short ('water-bus' style) ship routes don't use full-load. For the longer routes, they're more analogous to aircraft - they're better off sitting raising the station rating than zooming back and forth empty. Cargodist or not, full-load or not, ships rarely make the AI much money; the ships, and the AI in general, are primarily to create pleasant background movement for human players, rather than to play the game as efficiently as possible itself.


i haven t seen the short ship route yet, so it s good to know AI do adapt orders to profile of the route. and indeed ships were not good money maker in my test...but my settings for ships were far from optimal running cost wise too, so wasn t too surprised about that ;)
Now my concern about full load and cargodist was more about how it (might ?) mess cargodist links calculation. I m no sure about it, but i always thought (feeling from user experience, so i ll be happily proven wrong) full load cargo would end up making cargodist believe the capacity of line is zero and so in the AI case, that means ships staying for very very long, which indeed they were, but can t say the outcome on the long run as test stoped quite shortly after last report i made. i shall test further and report when i get some time ;)


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun Jun 10, 2018 6:27 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Mar 31, 2007 2:23 pm
Posts: 4676
Location: Lost in Music
romazoon wrote:
full load cargo would end up making cargodist believe the capacity of line is zero

FWIW, cargodist does not measure route capacity when assigning cargo to a next hop. So that should not be a problem here ;)

_________________
FIRS Industry Replacement Set (Released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (Finished)
Squid Ate FISH (ships) (Released) | CHIPS Has Improved Players' Stations (Finished)
Iron Horse (trains, released) | Termite (tracks for Iron Horse, released) | Busy Bee (game script, released)

Road Hog (road vehicles, released)


Top
   
 Post subject: Re: CivilAI
PostPosted: Sun Jun 24, 2018 3:36 am 
Offline
Graphics Moderator
Graphics Moderator
User avatar

Joined: Mon Sep 13, 2004 1:21 pm
Posts: 5300
Location: The Moon
Okay, Version 16:

- Intercity road connections are now built via a middle point, to make connecting cities faster and more reliable.
- Tweaks to the road pathfinder values to (possibly) reduce route duplication and messy road junctions.
- AI will not build trucks with top speed below 40km/h if faster vehicles are available (to avoid building HEQS crawlers).

Now up on Bananae.

_________________
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

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.