PAXLink - a PAX-only AI that uses feeder systems
Moderator: OpenTTD Developers
Re: PAXLink - a PAX-only AI that uses feeder systems
When I use just the Generic Cars GRF in a game it replaces the original buses. So that there is no normal buses for PAXLink to chose from. Even when I just tried to enable multiple side-by-side GRF sets in advanced settings the normal buses are gone.
If I add LongVehicles 4 for example, PAXLink picks the LV4 vehicles as they happen to get higher score in the vehicle selection.
If I add LongVehicles 4 for example, PAXLink picks the LV4 vehicles as they happen to get higher score in the vehicle selection.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: PAXLink - a PAX-only AI that uses feeder systems
I enabled both generic cars and egrvts. Other AIs chose the buses from egrvts, PAXLink didn't...
I am little, ugly, and nasty. How do you do?
Re: PAXLink - a PAX-only AI that uses feeder systems
PAXlink 12 crashed in my game with the following message:
Screenshot of the debug window: http://devs.openttd.org/~alberth/paxlink12_crash.png
Don't take too much attention of the red text at the bottom, it looks like a repetition of the text at the top.
Save game loads at my clean r16077 trunk
Code: Select all
dbg: [ai] [3] [S] Your script made an error: idx out of range
dbg: [ai] [3] [S]
dbg: [ai] [3] [S] *FUNCTION [RemoveInvalidStations()] /home/hat/.openttd/content_download/ai/PAXLink.12.tar/paxlink.12/townmanager.nut line [335]
dbg: [ai] [3] [S] *FUNCTION [ReadStatisticsData()] /home/hat/.openttd/content_download/ai/PAXLink.12.tar/paxlink.12/townmanager.nut line [342]
dbg: [ai] [3] [S] *FUNCTION [UpdateTownStatistics()] /home/hat/.openttd/content_download/ai/PAXLink.12.tar/paxlink.12/townmanager.nut line [49]
dbg: [ai] [3] [S] *FUNCTION [Start()] /home/hat/.openttd/content_download/ai/PAXLink.12.tar/paxlink.12/main.nut line [309]
dbg: [ai] [3] [S]
dbg: [ai] [3] [S] [@ITERATOR@] 3
dbg: [ai] [3] [S] [remove] 3
dbg: [ai] [3] [S] [_] 2
dbg: [ai] [3] [S] [remove_list] ARRAY
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] [3] [S] [@ITERATOR@] 40
dbg: [ai] [3] [S] [town_manager] INSTANCE
dbg: [ai] [3] [S] [_] 39
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] [3] [S] [this] INSTANCE
dbg: [ai] The AI died unexpectedly.
Don't take too much attention of the red text at the bottom, it looks like a repetition of the text at the top.
Save game loads at my clean r16077 trunk
- Attachments
-
- many-ais.sav
- save game, crash happens 1st half of september
- (217.83 KiB) Downloaded 165 times
Re: PAXLink - a PAX-only AI that uses feeder systems
i had paxlink on my map - the al didn't expand - just stuck to one station in one town
here a screenshot of it and saved the game - its shows the AL is not growing
see the al debug that reports he had stopped building = possibly crashed but no red texts
here a screenshot of it and saved the game - its shows the AL is not growing
see the al debug that reports he had stopped building = possibly crashed but no red texts
- Attachments
-
- Fort Martburg Transport, 7th May 1985.sav
- (76.8 KiB) Downloaded 185 times
-
- Fort Martburg Transport, 29th Mar 1986.png (73.39 KiB) Viewed 1652 times
Re: PAXLink - a PAX-only AI that uses feeder systems
bump - anyone can solve this?
Re: PAXLink - a PAX-only AI that uses feeder systems
The save game loads with MedievalAI for me, and it crashes almost immediately.
It could be something to do with ECS vectors. Specifically I think its related to tourists. Have you tried either...
A) Disabling the town vector
B) Using a houses set that is compatible with ECS (TTRS for instance)
I dont know about Medieval/PAXLink, but my own AI didn't like it when tourists existed as a cargo, but were not actually generated by any town.
It could be something to do with ECS vectors. Specifically I think its related to tourists. Have you tried either...
A) Disabling the town vector
B) Using a houses set that is compatible with ECS (TTRS for instance)
I dont know about Medieval/PAXLink, but my own AI didn't like it when tourists existed as a cargo, but were not actually generated by any town.
PathZilla - A networking AI - Now with tram support.
Re: PAXLink - a PAX-only AI that uses feeder systems
so where is TTRS? could you point out for meZutty wrote:The save game loads with MedievalAI for me, and it crashes almost immediately.
It could be something to do with ECS vectors. Specifically I think its related to tourists. Have you tried either...
A) Disabling the town vector
B) Using a houses set that is compatible with ECS (TTRS for instance)
I dont know about Medieval/PAXLink, but my own AI didn't like it when tourists existed as a cargo, but were not actually generated by any town.
Re: PAXLink - a PAX-only AI that uses feeder systems
Sorry I thought it would have been on bananas by now...
http://users.skynet.be/florisjan/ttd/ttrs.html
http://users.skynet.be/florisjan/ttd/ttrs.html
PathZilla - A networking AI - Now with tram support.
Re: PAXLink - a PAX-only AI that uses feeder systems
Shouldn't the AI check if the 2 cities are too close?
- Attachments
-
- Unnamed, 31st Mar 1960.png (107.83 KiB) Viewed 1655 times
Re: PAXLink - a PAX-only AI that uses feeder systems
Regarding tourists the AI has one function GetPAXCargo in helper.nut that using the available cargo class checking methods try to figure out what ID passengers has. If you want to use town vectors you are free to propose changes to that function to make it compatible with original OpenTTD as well as town vectors.
Yes this is not always good, but that is what can happen with independent decisions. There are plans for expanding the town "model" to make better decisions, but I am afraid currently I don't even have time to regularly visit the forums.
In the current version of PAXLink the decision to build bus stops in a town and to build an airport in that town are two somewhat independent choices. A third somewhat independent choice is to add a new air-line. In this choice if it has more than two airports to choose from, it try to pick a pair with longer distance. But if it only has two airports to choose from (most common) situations as the one you posted can happen.Wold wrote:Shouldn't the AI check if the 2 cities are too close?
Yes this is not always good, but that is what can happen with independent decisions. There are plans for expanding the town "model" to make better decisions, but I am afraid currently I don't even have time to regularly visit the forums.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems
Well the AI had a choice of 4 airports and it chose that 2, that's why I reported it.
And something for a little tweaking:
And something for a little tweaking:
- Attachments
-
- Duninghall Transport, 19th Feb 1963.png (131 KiB) Viewed 1624 times
-
- Duninghall Transport, 15th Jul 1963.png (109.83 KiB) Viewed 1616 times
Re: PAXLink - a PAX-only AI that uses feeder systems
Just posting an AI crash
Basic game
no newgrfs
single player only
Basic game
no newgrfs
single player only
Re: PAXLink - a PAX-only AI that uses feeder systems
mwyeoh wrote:Just posting an AI crash
Basic game
no newgrfs
single player only
Thanks
Hmm, that one, though I disabled it but maybe not. Was many weeks ago I sat with the code last. I've kept myself busy with traffic models at university the last weeks.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems
I have observed an 'oversight' with PAX
Since the generic tram set is now part of the game, when building buses, the AI does not check whether the 'road' it is connecting to is roads or tram lines
version 0.7.0
Since the generic tram set is now part of the game, when building buses, the AI does not check whether the 'road' it is connecting to is roads or tram lines
version 0.7.0
Re: PAXLink - a PAX-only AI that uses feeder systems
Thank you for your report, that is indeed something I didn't consider.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems
I just want to tell that I've looked into PAXLink and tried to change the code so that it does no longer use call-functions nor calling DoCommands from other places where it is now forbidden.
After having spent an hour or two on that I got that part to work, but found out that the townmanager crashed for some reason which I didn't have time to debug extensively enough at that time. So I have disabled PAXLink on Bananas for now. Because it doesn't make sense to use it in the current state when it does nothing at all but spaming the log window with error messages in the latest nightlies. Not sure when I'll be able to get it back running again.
After having spent an hour or two on that I got that part to work, but found out that the townmanager crashed for some reason which I didn't have time to debug extensively enough at that time. So I have disabled PAXLink on Bananas for now. Because it doesn't make sense to use it in the current state when it does nothing at all but spaming the log window with error messages in the latest nightlies. Not sure when I'll be able to get it back running again.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems
Got a situation for you where the AI has trouble: in one of my games, the AI built a town's intercity airport next to an industry that accepted passengers (a steel mill, IIRC) rather than near the town itself. All well and good, except that the industry went out of business and there are now two airports and four airplanes doing nothing but accumulate cargo.
Re: PAXLink - a PAX-only AI that uses feeder systems
Thanks for taking your self time to report the problem. I can not say anything when it will get fixed as the problems mentioned in my previous post have to be solved first, so that PAXLink get back workning on last nightly. Then to solve your problem it will need to know how to close down an airport and do so when it loses acceptance for passengers.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems
I'm happy to tell you that PAXLink is now again working with recent nightlies. [Edit: On 0.7.1 it seams to act strange. ] [Edit2: I couldn't reproduce the strange behavior when I had restarted OpenTTD with "-d ai=5". The strange behavior that I first noticed was that it removed grid bus-stops and many buses ended up with all orders invalid. ]
Changes:
Changes:
- Don't use call/pcall for valuator replacement, instead use Yexos code from AdmiralAI that do not use call/pcall.
- Fixed the by mwyeoh reported bug related to tram tracks. PAXLink will no longer build grid stations next to tram tracks with no road. (and if the road is removed but the tram is still there PAXLink removes the road station)
- Fixed the by Carnildo reported problem of when an inter city station (airport) stops accepting passengers. First, airplanes stop servicing it, then the buses and lastly the inter city station is removed. If it is so fast that there is still a bus on one of the bus stops it delays a bit, but not forever so in some rare cases a bus stop might be left over from the inter city station. And currently PAXLink does not remove non-grid bus stops that are not part of an IC station.
- I hope I have fixed the bug mentioned by Alberth and mwyeoh above. I could not reproduce it, but I realized by reading my code what could go wrong and have rewritten it so it should be safe now. The code removed zero, one or more items from an squirrel array. I made a list of all indexes to remove and then looped over the to_remove array and removed the items from the array of stations in a town. The problem is that when one station is removed, indexes with an higher number gets wrong. As opposed to when using pointers/iterators in C++ where the pointer will still point on the correct item even if some other elements have been removed.
- Attachments
-
- PAXLink-v13.tar
- (123.5 KiB) Downloaded 245 times
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: PAXLink - a PAX-only AI that uses feeder systems


Who is online
Users browsing this forum: No registered users and 5 guests