[AI] CityConnecter
Moderator: OpenTTD Developers
[AI] CityConnecter
I have just uploaded my first attempt on an AI, mostly done as a try on Squirrel and the NoAI API. It will select the largest cities (towns marked as city) and connect it with nearby towns (of any size), when distance to next town is too great, it jumps to the next city, and continues like that. Since it is a company, it will eventually go bankrupt as it doesn't try to make money in any way, but I have tried to make it so that it reduces the amount of loan while calculating the routes, so that, hopefully it can live a little longer and connect a few more towns.
Version 1 available on BaNaNaS
Version 1 available on BaNaNaS
- Attachments
-
- CityConnecter-1.zip
- CityConnecter v1
- (4.86 KiB) Downloaded 1684 times
Skippern
OpenTTD Mac user
OpenTTD Mac user
Re: [AI] CityConnecter
I have just started to recreate this AI as a GameScript, that way I will get the purpose of the AI covered without occupying a company slot.
I am still not sure of how I would want the GameScript to work other than I would like all towns and cities to build out the network towards their neighbouring towns.
One idea I have is that the speed of building will depend on town size, for example a town builds 4 tiles per 1000 citizen, while a city builds 8 tiles per 1000 citizen.
Another idea is that after a certain date, for example 1960, Cities will prioritise building dual carriage ways towards other cities (this does not apply to town links)
Further another idea, is large cities will try to make ring-roads circling the circumference of the city, this work might start in 1985.
I might do minor adjustment to the AI but will not do any major alterations. If any bugs encountered, please report them here.
I am still not sure of how I would want the GameScript to work other than I would like all towns and cities to build out the network towards their neighbouring towns.
One idea I have is that the speed of building will depend on town size, for example a town builds 4 tiles per 1000 citizen, while a city builds 8 tiles per 1000 citizen.
Another idea is that after a certain date, for example 1960, Cities will prioritise building dual carriage ways towards other cities (this does not apply to town links)
Further another idea, is large cities will try to make ring-roads circling the circumference of the city, this work might start in 1985.
I might do minor adjustment to the AI but will not do any major alterations. If any bugs encountered, please report them here.
Skippern
OpenTTD Mac user
OpenTTD Mac user
Re: [AI] CityConnecter
Doesn't seem to work well with bridges.
Also it builds unrealistic long bridges over lakes when it's possible to make a route on land around the lake.
Tested with JGR patchpack.
Also it builds unrealistic long bridges over lakes when it's possible to make a route on land around the lake.
Tested with JGR patchpack.
- Attachments
-
- Cityconnecter 1.png (267.91 KiB) Viewed 18259 times
-
- Cityconnecter 2.png (558.39 KiB) Viewed 18259 times
Re: [AI] CityConnecter
Thanks for feedback. I will make a note of this in case I do update this AI. I have somewhat abandoned the AI to re-create the same as a game script, though are far from having anything playable. I am currently in a play break from OTTD, and have no immediate plans to pick it up again.
Seems like the router have changed behavior since the AI was made, can't remember the turn immediately after bridge being an issue earlier
Sent from my iPhone using Tapatalk
Seems like the router have changed behavior since the AI was made, can't remember the turn immediately after bridge being an issue earlier
Sent from my iPhone using Tapatalk
Skippern
OpenTTD Mac user
OpenTTD Mac user
-
- Traffic Manager
- Posts: 222
- Joined: 18 Jun 2016 19:05
Re: [AI] CityConnecter
Please come back soon!
This AI would suit a GS perfectly. I've been building a road network at the start of my games using an idle AI for ages. I'd start by joining all The towns with motorways using The Dutch road furniture GRF, then join up all The primary industries to The nearest road creating a huge network. The problem with AIs was if the road was in your way, you were screwed. With a GS I'm assuming the roads would be town owned, so easier to "move" if you needed to. That and the money problems.
Hope you get this up and running. I'm available for testing and suggestions if needed.
This AI would suit a GS perfectly. I've been building a road network at the start of my games using an idle AI for ages. I'd start by joining all The towns with motorways using The Dutch road furniture GRF, then join up all The primary industries to The nearest road creating a huge network. The problem with AIs was if the road was in your way, you were screwed. With a GS I'm assuming the roads would be town owned, so easier to "move" if you needed to. That and the money problems.
Hope you get this up and running. I'm available for testing and suggestions if needed.
Re: [AI] CityConnecter
Another player here that would love a GS like this.
Having cities connect to one another with roads would increase the immersion a heck of a lot.
Having cities connect to one another with roads would increase the immersion a heck of a lot.
Re: [AI] CityConnecter
I have barely initiated the code for this as GS, than ran out of time. Currently I don't have OTTD installed, but hope to reinstall shortly
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Skippern
OpenTTD Mac user
OpenTTD Mac user
Re: [AI] CityConnecter
Yeesss you're still active! Awesome!skippern wrote:I have barely initiated the code for this as GS, than ran out of time. Currently I don't have OTTD installed, but hope to reinstall shortly
Sent from my iPhone using Tapatalk
Re: [AI] CityConnecter
Wouldn't call it active, rather a semi-present idle...
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Skippern
OpenTTD Mac user
OpenTTD Mac user
Re: [AI] CityConnecter
I have a problem, the AI wouldn't start. Always outputs this error:
Re: [AI] CityConnecter
Looks like you haven't downloaded all the required SuperLibs. If you download AIs via ingame content download, dependencies would be automatically selected for download aswell.bladez wrote:I have a problem, the AI wouldn't start. Always outputs this error:
Re: [AI] CityConnecter
Or a compatibility issue, anyway the correct version of minchin super lob should solve the problem
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Skippern
OpenTTD Mac user
OpenTTD Mac user
Re: [AI] CityConnecter
Last edited by kamnet on 29 Dec 2019 10:45, edited 1 time in total.
Reason: Image too large to display on forums, switched to link to image, embedded image inside spoiler tag for those who still wish to see it on the forums.
Reason: Image too large to display on forums, switched to link to image, embedded image inside spoiler tag for those who still wish to see it on the forums.
Re: [AI] CityConnecter
I guess you have completely abondoned this project.
-
- Engineer
- Posts: 1
- Joined: 13 Jan 2024 20:42
Re: [AI] CityConnecter
As I understand it, the problem has not been solved yet
Who is online
Users browsing this forum: No registered users and 5 guests