bugs

Ender [1]
Administrator
2022-01-26 00:15:34 🔗
[2 years, 334 days ago]

(Recording some notes here for myself to investigate later - this was reported over bmail and I wasn't able to quickly figure out what was going on.)

Up until what looks like August 2011 (http://bots4.net/history/2011/8/bots), 114 is the maximum level seen on the monthly bot rankings page. This is most apparent on the last month of open beta, June 2011 (http://bots4.net/history/2011/6/bots), where 50 of the 100 bots are listed as level 114.

Have a theory of what's happening? Share here - if your theory is correct, or if it even points me in the right direction, I'll give you a free star!


 
Gpof2 [131]
2022-01-26 13:45:23 🔗
[2 years, 334 days ago]

Total exp for level 114 is 2,240,131,840 which is the first to pass signed 32 bit integer limit, maybe related there somehow in conjunction with whatever hard/software was used for the server at the time.


 
Nosferatu [319]
2024-06-01 18:37:20 🔗
[207 days ago]

Did Gpof get a free star? :D


 
Ender [1]
Administrator
2024-06-18 15:54:54 🔗
[190 days ago]

Figured it out. Thanks for the hint, Gpof - I just sent you a star!

Technical details: I checked the database table where historical records for past months are stored. One tidbit about the game's database is that it stores levels almost nowhere, but rather instead stores exp values and then converts to levels on the fly when they're needed. The historical records table is no exception, so unsurprisingly, I found there were many records from August 2011 and earlier with an exp value of 2,147,483,647, which corresponds to level 114. This number is 2^31-1, which is quite suspicious and (as Gpof said) points at an integer size limitation that was in place at the time. Since the problem wasn't present for the September 2011 records, I looked through commits to the game's codebase during that month. On September 5, 2011, I submitted "Bugfix: Exp values being truncated from using integer instead of double.". That then led me to http://bots4.net/forum/3/2456 which is what prompted me to fix it at the time. Note that that thread talks specifically about profile shadows (i.e. records from when you've reset your bot) - what I failed to mention is that I also fixed the same problem in the end-of-month script.

What's next: This bug suffers from the unfortunate combination of being (a) tedious to fix and (b) low priority, so it'll probably stay as is for awhile. It's tedious to fix because it requires combing through old database backups (and this is still imperfect - they're taken at 12:05am server time each night, so if you gained exp in the last 23 hours and 55 minutes of the month, that information is gone forever). This is also further complicated at the moment by the fact that the hard drive that I have these decade+ old records in is currently in need of repair (fingers crossed). And it's low priority because it doesn't really break anything. For now, I've just added a notice to the historical HoF pages when viewing the affected months with a link to this thread.

Side note: I'm surprised this hadn't been noticed until now (well, 2022). Or maybe it was and I'm forgetting? IIRC in the last days/hours of open beta, I'd cranked up exp rates 1000x or something ("Time of Madness") and a bunch of bots hit level 500+. I would have assumed people found it jarring to not see that reflected in the historical HoF.


 
Gpof2 [132]
2024-06-18 16:03:18 🔗
[190 days ago]

I most definitely had mentioned it a few times, maybe even in bmail. Thank you very much for the star and nos as well for the necro bump B)