AInur Posted yesterday at 12:35 Report Share Posted yesterday at 12:35 You might be interested in: 1 Quote Link to comment Share on other sites More sharing options...
0 calories Posted yesterday at 13:18 Report Share Posted yesterday at 13:18 @ffmmaybe consider adding on chart some output like CPS take all commands within every 1 minute period and count it. My test shows I reach average 20-22 CPS. Tested on this website https://clickspeeder.com/click-per-second/ but probably any other will work the same. 1 Quote Link to comment Share on other sites More sharing options...
AInur Posted yesterday at 13:36 Report Share Posted yesterday at 13:36 (edited) 18 minutes ago, 0 calories said: My test shows I reach average 20-22 CPS. Tested on this website https://clickspeeder.com/click-per-second/ Wow you are fast! Using your website, I get between 5 clicks and 9 clicks per second, with a mode of 7. This is consistent with the peaks in the graph from ffm's script. In addition, the simulation lag prolongs the turn times, so it's possible to have values equal or slightly exceeding the score from this website. The highest value seen on sanafur's graph was 17, which is well below his maximum CPS (especially when considering in-game lag), so everything is well explained. Edited yesterday at 13:38 by AInur 1 Quote Link to comment Share on other sites More sharing options...
ffm2 Posted yesterday at 13:44 Author Report Share Posted yesterday at 13:44 On 15/11/2024 at 10:23 PM, ffm2 said: The highest of sanafur is 58 per turn (0.2 seconds). 58 / 0.2 = 290 clicks per second. The world record is (presumably) 1051 clicks per 10 seconds for clicking on any spot. World record speed per turn would be 1051 / 10 * 0.2 = 21 clicks per turn. But this is not clicking on any spot. 1 Quote Link to comment Share on other sites More sharing options...
0 calories Posted yesterday at 13:51 Report Share Posted yesterday at 13:51 (edited) @ffm Can you get overall statistic for lets say 100 games with me and see if these values are over-reached in all cases? I havent change it for year so I guess prove is in data - check and see .-) and i stand by my claims might be another aspec of these high values? is lag capable to recieve multiple timeframes within one or so? Edited yesterday at 13:53 by 0 calories Quote Link to comment Share on other sites More sharing options...
ffm2 Posted yesterday at 13:52 Author Report Share Posted yesterday at 13:52 This site has some interesting tests: https://www.arealme.com/apm-actions-per-minute-test/en/ But this is a bit too difficult. That record is 733 apm or 12.22 clicks per second or 2.44 clicks per turn Their cps test is nice displayed, but too easy (this should have a world record of 105 cps): https://www.arealme.com/click-speed-test/en/ Quote Link to comment Share on other sites More sharing options...
0 calories Posted yesterday at 13:56 Report Share Posted yesterday at 13:56 3 minutes ago, ffm2 said: This site has some interesting tests: https://www.arealme.com/apm-actions-per-minute-test/en/ But this is a bit too difficult. That record is 733 apm or 12.22 clicks per second or 2.44 clicks per turn Their cps test is nice displayed, but too easy (this should have a world record of 105 cps): https://www.arealme.com/click-speed-test/en/ This side gives me same results 1 Quote Link to comment Share on other sites More sharing options...
ffm2 Posted yesterday at 19:19 Author Report Share Posted yesterday at 19:19 (edited) This is a new update. Its a version for single games, that's easier to change, adapt, debug etc.. And one with the multiprocessing. For my Pc it didn't run through all games within my limited patience, so I tested it only in a folder with 10 games. It deletes .png files in the folders where it finds a commands.txt, so if you have stored pngs in your replay folder save them elsewhere. But I assume you might ran the old version and want the updates in the folders. Apart from already discussed command-analysis it features Colors are now in game colors Legend moved outside of the plot If you have a metadata.json of the game also: the eco_score of used resource (instead of gathered resources) units trained over time The attached figures are from the first game of the sanafur games that has also zoomed figures on page 2 in this thread. single_game_analyzer.py Edited 6 hours ago by ffm2 4 Quote Link to comment Share on other sites More sharing options...
AInur Posted 19 hours ago Report Share Posted 19 hours ago @ffm2 Very nice scripts, thanks! On the first run of snipe_analyzer_platinum.py, there were some errors due to adding numpy arrays of different datatypes. The lines 220-224 have been fixed for you: def eco_scores(seq): score = np.array(seq['resourcesUsed']['food'], dtype='int64') score += np.array(seq['resourcesUsed']['wood'], dtype='int64') score += np.array(seq['resourcesUsed']['metal'], dtype='int64') score += np.array(seq['resourcesUsed']['stone'], dtype='int64') You need to specify the datatype when converting lists to numpy arrays. Also on line 20, you printed the string 'path' instead of the actual path. Both bugs are fixed in this file below: snipe_analyzer_platinum.py Applying your script on my replays: 1 Quote Link to comment Share on other sites More sharing options...
ffm2 Posted 17 hours ago Author Report Share Posted 17 hours ago Thanks, should all be in the single_game_analyzer.py too. Also I wrote si[N]gle in one chart... Still some to improve but the basis is better now. Quote Link to comment Share on other sites More sharing options...
0 calories Posted 11 hours ago Report Share Posted 11 hours ago 17 hours ago, ffm2 said: This site has some interesting tests: https://www.arealme.com/apm-actions-per-minute-test/en/ But this is a bit too difficult. That record is 733 apm or 12.22 clicks per second or 2.44 clicks per turn Their cps test is nice displayed, but too easy (this should have a world record of 105 cps): https://www.arealme.com/click-speed-test/en/ 7 hours ago, AInur said: @ffm2 Very nice scripts, thanks! On the first run of snipe_analyzer_platinum.py, there were some errors due to adding numpy arrays of different datatypes. The lines 220-224 have been fixed for you: def eco_scores(seq): score = np.array(seq['resourcesUsed']['food'], dtype='int64') score += np.array(seq['resourcesUsed']['wood'], dtype='int64') score += np.array(seq['resourcesUsed']['metal'], dtype='int64') score += np.array(seq['resourcesUsed']['stone'], dtype='int64') You need to specify the datatype when converting lists to numpy arrays. Also on line 20, you printed the string 'path' instead of the actual path. Both bugs are fixed in this file below: snipe_analyzer_platinum.py 11.34 kB · 2 downloads Applying your script on my replays: Any idea what is wrong here? 2018-04-28_0001 Process Process-1: Traceback (most recent call last): File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run() File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "/home/me/.local/share/0ad/replays/0.0.26/snipe_analyzer_platinum.py", line 31, in analyse_replay player_data = commands[0].split(',"PlayerData":[')[1] # crop unnecessary IndexError: list index out of range Quote Link to comment Share on other sites More sharing options...
AInur Posted 9 hours ago Report Share Posted 9 hours ago 2 hours ago, 0 calories said: player_data = commands[0].split(',"PlayerData":[')[1] # crop unnecessary IndexError: list index out of range This index error is caused by referencing an index greater than the length of the list. It could either be caused by commands[] being an empty list (your commands file was empty) or if there was no valid players. Given this replay was from 2018, it's very possible that earlier versions of the game stored its replays in different formats, so this heuristic script won't be able to interpret it correctly. Since the analyse_replay function is already in a try-except condition, the analysis for this particular replay failed but the other replays should be analysed correctly. It would be helpful if you can post that particular replay from 2018-04-28_0001 here for me. Quote Link to comment Share on other sites More sharing options...
0 calories Posted 7 hours ago Report Share Posted 7 hours ago ohh there was multiple errors and the last i posted was misleading. I endup with this error: AttributeError: 'Legend' object has no attribute 'legend_handle and fixed it (here is why https://github.com/fastlmm/FaST-LMM/issues/48 and https://github.com/matplotlib/matplotlib/issues/28680) so if you face similar issue replace legend_handles with legendHandles thanks Quote Link to comment Share on other sites More sharing options...
0 calories Posted 7 hours ago Report Share Posted 7 hours ago (edited) DO NOT RUN IT if you have larger replays directory! Your machine will get over busy and all you have running will crash. Script run all in paraler so it cant handle too many directorys = new process...! FORK BOMB - crash your PC. Exhaus memory triggier swap and kills everything Edited 7 hours ago by 0 calories 1 1 Quote Link to comment Share on other sites More sharing options...
ffm2 Posted 6 hours ago Author Report Share Posted 6 hours ago Oh, good I aborted after I heard my fans blow up and tested afterwards in a test directory with only 10 replays. This should be fixed but I only tested it in the test directory again. This can be run on only one case with multiprocess = False and a specified path (good for editing/debugging etc.) Can process a part of your database (first 10% in batches) limit number of processes (is set on 4 for now) delete pngs (good to delete all the pngs named sigle) multiprocess = False # you can specify to handle which part of your db you want process. # E.g. test with [0, 10] and if it works in a reasonable time do [10, 100] next. # in percent process_part_database = [0, 10] parallel_processes = 4 path = "2024-11-13_0009/" # for single game delete_pngs = False game_analyzer.py 1 Quote Link to comment Share on other sites More sharing options...
ffm2 Posted 6 hours ago Author Report Share Posted 6 hours ago 1 hour ago, 0 calories said: AttributeError: 'Legend' object has no attribute 'legend_handle and fixed it (here is why https://github.com/fastlmm/FaST-LMM/issues/48 and https://github.com/matplotlib/matplotlib/issues/28680) so if you face similar issue replace legend_handles with legendHandles That's annoying. I got matplotlib 3.9.2, so quite new (instead of what they wrote). And for me the other way don't work: AttributeError: 'Legend' object has no attribute 'legendHandles' I don't want to include some checks to execute different code for different versions of matplotlib ... So I agree, if you have a similar issue, replace it yourself, sorry (-.-) 1 Quote Link to comment Share on other sites More sharing options...
AInur Posted 5 hours ago Report Share Posted 5 hours ago Apologies, the previous script was designed for moderate replay databases and purely optimised for performance. This version is safer as it counts the number of CPU cores that you have and limits the number of processes to just your core count. Of course it will be slower, but it's safer for low end systems. snipe_analyzer_platinum_safe.py The final process has to do the extra work, which slows down the overall generation. You can of course limit the folders that you want (for example we can have a CLI input for the user). I had no problem with running 100 concurrent processes, but it might be unsafe for some users. We can also try a multiprocessing pool. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.