Auto play functionality using puppeteer #94
Replies: 2 comments
-
Hi there @flynorc Maybe this discussion space would be nice place to share scripts and strategies. |
Beta Was this translation helpful? Give feedback.
-
I've gone ahead and published my first stab at it here: So far it seems to me that using my rather simple and basic approach the easy and normal modes do end at some point, and hard and above can go for ever. I haven't played too much with the timings params but esentially the concept is: every x ms take a look at the canvas and make a list of things to click (IO, remove done and green processes from cpu, add new processes to cpus, and make sure the memory pages that need to be in ram are in ram and then execute those clicks. I think the memory management bit should actually be separated such that we do IO and cpu bits first, do those clicks and then look at the memory, rather than waiting for the next iteration, because that way in some cases the process added is just idling on the cpu because of waiting for memory pages to be added to ram. Another thing that would be nice to do is make it more dynamic and robust such that it's not relying so much on the "magic numbers" of where things are supposed to be on the screen but rather having the initial scan do some sort of "ocr"/image recognition and looking for where things are placed Another thing to consider maybe would be to not wait until process is green before we remove it from the cpu and add another one; for example removing an orange process and replacing it with dark red might make more sense in some cases as it could happen that the dark red process starts waiting for IO request while in idle and in some cases the IO blocks it for so long that it gets killed. On similar note at the moment if there are only green processes, we keep swapping them on each iteration which is not optimal at all, but not the end of the world since as soon as some go orange (or red) they take priority... Let me know your thoughts on how this can be cleaned up and improved. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've thrown together a quick and dirty puppeteer "script" that plays the game and does the clicking for me, just for fun to try it out how much better it would do compared to my manual clicking. What is the best way to share it with the community and get some feedback on how to clean it up and/or ideas on how to improve the (currently very basic) algorithm used to determine what to click and when?
Beta Was this translation helpful? Give feedback.
All reactions