ChooChoo, a train network AI
Moderator: OpenTTD Developers
Re: ChooChoo, a train network AI
Hey Wold, thanks for the screenshots. Fixed another bug No idea what happened in #3 though...
I'll make the search slightly less than fully random, and build in some Sleep() calls. I've got some other modifications planned as well. Back to hacking after this post
The newgrf sets are tricky - I found out the problem with the 2cc set. I just picked the fastest locomotive, which instead of 40k or 50k is suddenly some 220k monster which it'll never be able to afford on its starting loan. I guess I'll have to define minimum/maximum parameters for evaluating them.
I'll make the search slightly less than fully random, and build in some Sleep() calls. I've got some other modifications planned as well. Back to hacking after this post
The newgrf sets are tricky - I found out the problem with the 2cc set. I just picked the fastest locomotive, which instead of 40k or 50k is suddenly some 220k monster which it'll never be able to afford on its starting loan. I guess I'll have to define minimum/maximum parameters for evaluating them.
Re: ChooChoo, a train network AI
I dont know if this has been known or not but. I think you should only build depot if its head is flat too.
- Attachments
-
- choochoo_depot.png (34.85 KiB) Viewed 7522 times
-
- Engineer
- Posts: 58
- Joined: 19 Apr 2009 11:50
Re: ChooChoo, a train network AI
Yep. With 2cc ChooChoo builds monorail networks and don't build normal trains for them. Cause seems to be that no mail wagons available for monorails (no errors or warnings at debug console). Edit: And just got a crash.FHS wrote:One time the 2cc set and another time the outdated swiss set taster, i didnt seem to work with either.
Russia
Re: ChooChoo, a train network AI
Yup, that'll break it. I didn't expect there'd be train sets without cargo wagons. I'll add a check for that...Dezmond_snz wrote:Yep. With 2cc ChooChoo builds monorail networks and don't build normal trains for them. Cause seems to be that no mail wagons available for monorails (no errors or warnings at debug console).FHS wrote:One time the 2cc set and another time the outdated swiss set taster, i didnt seem to work with either.
Re: ChooChoo, a train network AI
Update!
- clean up failed crossing exits instead of capping them with depots
- engine selection should now work with newgrfs
- money management to prevent bankrupcy
Still to do:
- improve startup
- prevent it from blocking its own crossings
- clean up failed crossing exits instead of capping them with depots
- engine selection should now work with newgrfs
- money management to prevent bankrupcy
Still to do:
- improve startup
- prevent it from blocking its own crossings
-
- Engineer
- Posts: 58
- Joined: 19 Apr 2009 11:50
Re: ChooChoo, a train network AI
Good work! It plays very nice now.Michiel wrote:Update!
- clean up failed crossing exits instead of capping them with depots
- engine selection should now work with newgrfs
- money management to prevent bankrupcy
Still to do:
- improve startup
- prevent it from blocking its own crossings
But sometimes it clears wrong exits of crossings. E.g. should clean SE direction but it clears NE instead, which is already connected to station. After that it built some trains - they lost immediately...
Russia
Re: ChooChoo, a train network AI
Woops... that's not good. I'll go check
Re: ChooChoo, a train network AI
Hmm, couldn't find that particular problem, but here's another update. This one shouldn't block off its own crossings and it starts off with a couple cheap single track lines.
Also, new screenie: I let it run for about 30 years on a 1024x1024 map and it built this massive network, which it is currently still expanding.
Also, new screenie: I let it run for about 30 years on a 1024x1024 map and it built this massive network, which it is currently still expanding.
Re: ChooChoo, a train network AI
Now also available in Bananas And now I'm off to bed
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: ChooChoo, a train network AI
this is amazing! Of course, it's not as clever as some of the others, but I you only want to watch an AI building, this one is always active!
I am little, ugly, and nasty. How do you do?
Re: ChooChoo, a train network AI
Thanks! And I'm definitely trying to make it as stupid as possible... cleverness just breeds bugs Trying to find simple algorithms that result in nice looking results. The train management is definitely TOO stupid at the moment, though.
Re: ChooChoo, a train network AI
its just built this junction near my network, but i cant see what use it is as nothing is allowed to exit it due to the way the signals are placed
prehaps they should not be one way
prehaps they should not be one way
- Attachments
-
- Hendhead Transport, 29th Sep 1938.png (49.82 KiB) Viewed 3801 times
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: ChooChoo, a train network AI
Also, it seems there are some missing rails to that crossing (well, you can do without them, but adding them allows to reduce the number of sharp turns, and also to run more trains on the junction depending on where they are going)
I am little, ugly, and nasty. How do you do?
Re: ChooChoo, a train network AI
All junctions start with the signals facing "out" on purpose. At first they didn't, but then trains would try to drive into an unfinished exit and get stuck trying to turn around. Now, it builds the connection first and then flips the appropriate signal around to allow trains to pass.dasy2k1 wrote:its just built this junction near my network, but i cant see what use it is as nothing is allowed to exit it due to the way the signals are placed
prehaps they should not be one way
That's true, I removed the extra tracks to make the junctions look cleaner, but maybe I'll add them back in.cmoiromain wrote:Also, it seems there are some missing rails to that crossing (well, you can do without them, but adding them allows to reduce the number of sharp turns, and also to run more trains on the junction depending on where they are going)
Re: ChooChoo, a train network AI
I personally liked the look of your crossings. It made your AI kinda unique... you just had to look at the crossing and knew "oh, that's built by ChooChoo".Michiel wrote: That's true, I removed the extra tracks to make the junctions look cleaner, but maybe I'll add them back in.
Re: ChooChoo, a train network AI
You mean the current ones (screenie in first post), or the old ones with extra diagonal tracks?
Re: ChooChoo, a train network AI
I meant the current one (first post).
The old one you just posted, looks so "usual".. of course it's a bit more efficient than the current one (allows two trains to turn left at the same time), so you have to decide
The old one you just posted, looks so "usual".. of course it's a bit more efficient than the current one (allows two trains to turn left at the same time), so you have to decide
Re: ChooChoo, a train network AI
Efficiency, schmefficiency, I just want it to look pretty If you're gonna go bankrupt, you might as well go with style! Also, it's hard not to make millions of dollars with a handful of trains, so I'm not worried about profit after the first year or two.
Re: ChooChoo, a train network AI
Update: sane brains for the new trains!
... which means it adds N (=3) trains per new station built, and sends them to those stations most in need of more trains (cargo produced vs. estimatedly carried off per month).
... which means it adds N (=3) trains per new station built, and sends them to those stations most in need of more trains (cargo produced vs. estimatedly carried off per month).
Re: ChooChoo, a train network AI
Hi Michiel,
I have followed this thread since you announced your AI here but have not tested it myself until today. Must say it is really cool to watch!
Very good job!
I noticed that sometimes it removes the unused entrances to a node and in one case it removed the destination station for an industry chain after the route was constructed and a train was built. (I can't promise that it was removed after the train was built, but at least I can confirm that it built a train.)
I have followed this thread since you announced your AI here but have not tested it myself until today. Must say it is really cool to watch!
Very good job!
I noticed that sometimes it removes the unused entrances to a node and in one case it removed the destination station for an industry chain after the route was constructed and a train was built. (I can't promise that it was removed after the train was built, but at least I can confirm that it built a train.)
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 3 guests