AdmiralAI v25
Moderator: OpenTTD Developers
Re: AdmiralAI v25
If you can reproduce that problem I'd like to see that savegame very much. It's something that is definitely not fixed between version 22 and 25, I suspect you have been changing newgrfs, but I'm not sure that is the cause of the problem. Even in that case I'd like to try and fix it in my AI.
Re: AdmiralAI v25
After updating to v25, I got a more serious crash:
http://www.tt-forums.net/viewtopic.php? ... 56#p896556
http://www.tt-forums.net/viewtopic.php? ... 56#p896556
-
- Engineer
- Posts: 6
- Joined: 17 Aug 2010 12:18
Re: AdmiralAI v25
Hi all,
I just got an error in a game where I played against seven Admiral AI's (v25).
I think the problem occured when Electric loc's were introduced and the (only) AI having trains tried to change his tracks into wired tracks.
Regards
I just got an error in a game where I played against seven Admiral AI's (v25).
I think the problem occured when Electric loc's were introduced and the (only) AI having trains tried to change his tracks into wired tracks.
Regards
- Attachments
-
- screencap1.JPG
- (353.9 KiB) Downloaded 2 times
Re: AdmiralAI v25
Hi, I'm playing a game against 3 AdmiralAI's and just ran into a crash of it.
I've attached a screenshot of the crash, a savegame which I made just after the crash and the last autosave before the crash.
I've attached a screenshot of the crash, a savegame which I made just after the crash and the last autosave before the crash.
- Attachments
-
- Admiral_AI_crash.png
- Screenshot of the crash
- (473.75 KiB) Downloaded 2 times
-
- United movers, 12th Jan 1967.sav
- Savegame made just after the crash
- (1.17 MiB) Downloaded 194 times
-
- autosave4.sav
- Last autosave before the crash
- (1.16 MiB) Downloaded 192 times
Re: AdmiralAI v25
Flaggerdagger and Yisc thanks for your reports. I suspect that the save/load code is still not working correctly, I'm currently trying to fix this bug.
Re: AdmiralAI v25
It's a little bit offtopic, but it would be interesting for me: Is it really better to initialise variables with 'null'? Why not just set new variables to digital '0'?
I often read this error with the 'invalid type null' in bug reports.
I think you're really a good programer and you know what you are doing. So, what is the advantage of using null?
I often read this error with the 'invalid type null' in bug reports.
I think you're really a good programer and you know what you are doing. So, what is the advantage of using null?
Re: AdmiralAI v25
This way I get a much better bug report. If I initialized the value to 0 I could get a "divide by zero" error a few lines later, which would then leave me wondering whether I forgot to initialize the value completely or whether the value was incorrectly initialized to 0. With null when I see the bug report I know immediately that I forgot to initialize this variable somewhere. Where exactly that is I still need to find out, but at least the cause of the bug is clear.
In this particular case when the value was initialized to 0 instead of null the AI would not crash but would instead build stations incorrectly. That would give other (much more obscure) bug reports, which are much harder to trace. In general I prefer a crash of the AI above unexpected behavior, because a crash if a lot easier to trace and fix.
In this particular case when the value was initialized to 0 instead of null the AI would not crash but would instead build stations incorrectly. That would give other (much more obscure) bug reports, which are much harder to trace. In general I prefer a crash of the AI above unexpected behavior, because a crash if a lot easier to trace and fix.
Re: AdmiralAI v25
I've investigated a little more and started playing tonight with the already supplied autosave.
At the 1st of january 1967 the SH30 electric train is introduced and then again the AI crashed at the 12th of januari 1967. (which happened at the same date yesterday)
Hopefully this will give you some extra information to determine where it's going wrong.
At the 1st of january 1967 the SH30 electric train is introduced and then again the AI crashed at the 12th of januari 1967. (which happened at the same date yesterday)
Hopefully this will give you some extra information to determine where it's going wrong.
-
- Engineer
- Posts: 6
- Joined: 17 Aug 2010 12:18
Re: AdmiralAI v25
Lol! That was exactly the same with my game. When E-locs (SH30) were introduced, error came up.
Good luck with the fix! If you need any other info / files, just say so
Good luck with the fix! If you need any other info / files, just say so
Re: AdmiralAI v25
Another null/integer crash - in year 1974...
Screenie:
Screenie:
- Attachments
-
- Valencia Transport r20676, 13th Jan 1974.png
- (200.54 KiB) Downloaded 2 times
NewGRF: Oil Wells in Temperate terrain now can Increase production, Better vehicle names, Use-able default aircraft, Oil Rig for Snowland and Desert, Speed for Suspension bridges.
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Patches (OpenTTD): Improved smooth_economy [in trunk], More (diesel) smoke [in trunk], Realistic_acceleration finetune.
Keep 'em rollin'!
Re: AdmiralAI v25
I don't want to sound impatient, but any chance this problem will be fixed soon?
Re: AdmiralAI v25
not a bug as such, but while running the AI trains only i got this train jam:
- Attachments
-
- admiralai train jam.png (268 KiB) Viewed 6891 times
-
- admiralai train jam.sav
- can't remember what version but it was definitely <r20600
- (198.53 KiB) Downloaded 192 times
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
-
- Tycoon
- Posts: 1395
- Joined: 12 Jun 2004 00:37
- Location: United Kingdom of Great Britain and Northern Ireland
- Contact:
Re: AdmiralAI v25
Running v25 with FIRS and the Japanese trainset. The AI builds a valid route between unserved stations, it builds a train, it gives the train orders, but it doesn't start the train. The reason is because the particular wagons it's using for that train require a brake-van but the AI doesn't build one. Is there a way for Admiral to discover this requirement without it having to be hard-coded for each GRF?
Re: AdmiralAI v25
Unfortunately not, because there is no way for the newgrf to specify that requirement to OpenTTD other than by disallowing to start the vehicle (which can be for a number of reasons). What AdmiralAI can do is detect the failure to start the vehicle and not build that combination of engine+wagons again. It'll have to rediscover that ever game, so it's not a very good solution but better than nothing.
Re: AdmiralAI v25
hmm.
i could swear that i saw SimpleAI add a brake van to one of its trains...
I'd confirm it now but my computer is out of action
i could swear that i saw SimpleAI add a brake van to one of its trains...
I'd confirm it now but my computer is out of action
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: AdmiralAI v25
??? Really?Lord Aro wrote:i could swear that i saw SimpleAI add a brake van to one of its trains...
SimpleAI doesn't have support for NewGRF trainsets. It may work in some cases, but the term 'brake van' is unknown for SimpleAI.
I think you saw a mail wagon attached to a passenger train instead...
Re: AdmiralAI v25
nope, was definately a brake van, i checked on the train info
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: AdmiralAI v25
Can you provide a savegame where simpleai does that?
Re: AdmiralAI v25
ok, i take that back.
I can't find the savegame a originally noticed it in, but testing shows that it was probably UKRS2 with it adding a lookalike on the end of the train
Sorry for wasting your time
However, perhaps this is something to add to the NewGRF/AI spec? Whether the wagon needs a brake van or not, and defining a brake wagon. Perhaps?
I can't find the savegame a originally noticed it in, but testing shows that it was probably UKRS2 with it adding a lookalike on the end of the train
Sorry for wasting your time
However, perhaps this is something to add to the NewGRF/AI spec? Whether the wagon needs a brake van or not, and defining a brake wagon. Perhaps?
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: AdmiralAI v25
Any news about a possible new version of this AI?
I would really like to play on with it, but am still stuck with this crash when SH30 is introduced.
I would really like to play on with it, but am still stuck with this crash when SH30 is introduced.
Who is online
Users browsing this forum: Semrush [Bot] and 13 guests