WorkingRobot / Craftimizer

The best FFXIV crafting solver via hardware accelerated Genetic MCTS.
MIT License
15 stars 5 forks source link

Runaway Iteration #12

Open Redland123 opened 7 months ago

Redland123 commented 7 months ago

Issue: Macro generation seems to ignore iteration limit while missing seemingly simple ability sequence. Results in endless CPU utilization while the crafting log is open or while using the generate function of the simulator.

Screenshots: Solver progress screenshot: Runaway Screenshot

Working user created ability sequence: Working Skill Order Screenshot

Settings: (Mostly default aside from the general tab and a reduced max core count to maintain system performance.) Current Settings Screenshot

Tested settings and their impact: (All settings in the simulator tab were default besides the one being tested. General tab settings where the same as in the above screenshot. Each test was run for ~1m before being stopped manually)

Notes:

System Info: Plugin Version - v2.0.3.0 OS Name - Microsoft Windows 10 Pro Installed Physical Memory - (RAM) 32.0 GB Processor - AMD Ryzen 5 5600X 6-Core Processor, 4200 Mhz, 6 Core(s), 12 Logical Processor(s)

Other: Thank you for the plugin and your time.

WorkingRobot commented 7 months ago

The runaway simulation shouldn't really happen.. It only happens when it hasn't found any valid solution in those iterations. An iteration counts as valid if it manages to complete a macro. I'll investigate this and see if I can figure out a way to fix that.

DanteLuck commented 3 months ago

Sorry, i don't know too much about coding or how to troubleshoot it, but this happened to me yesterday as well, i was crafting Tsai with culinary, i used a HQ ingredient whilst crafting, in the midst of it everything locked up for a good 8 minutes before i had to force a shutdown and reboot the computer manually, all my settings were set to default

Stepwise furcated algoithm 500k iterations 30 max step 4 explored constant 0.1 score weighing 20 max core 32 fork 16 furcated action count

This is the second time it happens and i had to temporarily turn off synthesis helper during this as i got an idea already how to craft them without the helper (hasnt happened since i disabled it). I wonder if its related more to the synthesis helper trying to suggest a path which results in a bad value then tries again, repeating, like a distributed denial-of-service.

Now, this does NOT happen frequently, this is my second time within a span of 1 month of pretty much constant playing and leveling all crafts from 50-90. so it's definitively a rare occurance.

WorkingRobot commented 3 months ago

Hmm, did you use the new update? If so, did you happen to see what % it was at? I now display it when it goes past 100 and provide a tooltip so you know what's going on. Oftentimes, it's a good idea to help the solver in the first step or two (usually Muscle Memory and Manipulation) since those take the most time, but should never really change.

If the number is past ~1000%, you might want to hit stop and retry because too many iterations can use up several GB of ram. Though really, I should add a built-in hard cutoff so it stops automatically to prevent yourself from locking up your system like that when you're not paying attention.

DanteLuck commented 3 months ago

Incidentally enough this happened yesterday, before using the update. Will try again and see what happens, thanks for the quick reply. But like i also mentioned, this has happened only 2 times during a month of playing (currently unemployed so lots of time to play), so replicating might be hard, but ill give it a go to help troubleshoot.

the build i have is a 4070ti, r9 3900x, 64gb ram so it should be fine, i wasnt able to hit stop once it started lagging out, being able to work at approx 1frame per 2s or so, but even then input was very limited to the point where i had to force a shutdown via power button.

WorkingRobot commented 3 months ago

Yeah, I noticed a few days ago that the solver can leave that ram allocated in the background, and it only went away when I disabled and re-enabled the plugin. I'll see if I can fix that tomorrow as well

femxiii commented 2 months ago

I've been managing to push past the iteration limit on the Synthesis helper. The highest I've seen is something in the region of 23,000,000/100,000.

Percent complete shows as over 100% during this.

Anecdotally: it happened after I removed Heart and Soul from the rotation (because I was missing the reagent)