dazemc / ffxiv-craft

Web frontend for FFXIV Crafting Optimizer service.
14 stars 5 forks source link

Solver selecting worse rotations than Initial Guess #29

Closed Envian closed 2 months ago

Envian commented 3 months ago

I am trying to use the solver to optimize a mid level craft. Every time I run it however, it immediately pulls the Trained Perfection + Groundwork combo to the beginning of the rotation, and produces a rotation with both less progress and quality than my initial guess.

I've attached my settings - which I hope contains the [100] Cooking Mama rotation. This rotation meets the quality and progress requirements to craft HQ, but running it through the solver will result in a rotation which meets neither.

Note that I've fiddled with my solver settings a lot over my time with this project - please let me know if something I changed caused this issue.

settings(2).zip

dazemc commented 3 months ago

TP just tries to prepend the first instance of groundwork or preparatory touch, I am working on a different method but I noticed other issues in doing so. I have noticed that the fitness and penalties that is supposed to keeping track of which gen has the best child is not reflecting/working correctly. I also want to invalidate any sequences that are not valid, like ones that don't meet progress. There is "optimizations" that someone has written in the past that may have been beneficial at the time. Right now I'm working on a portion of the code that rewards sequences that are shorter because I think it might be the cause of some of these issues. Another one that someone added ignores wasted CP costs... There's just a lot to read through.

Can you upload the execution log from the solver? I can also use your seed that way and look at exactly what is going on. I want to look at the fitness scores on the sequences, I've noticed the first 2 are always negative and in my mind the first guess should be the initial guess. I'll hopefully have it done before the weekend.

dazemc commented 3 months ago

Just pushed some changes, let me know if it looks better.

Envian commented 3 months ago

Thank you for the quick turnaround! Unfortunately I still get a similar problem even with the changes. Right now, the TP is being placed right after a veneration, pushing a groundwork out of the buff window. Here's a screenshot of the initial guess (Which hits 100% progress and quality), and the result:

image

In this case, I expect the TP to be placed later - on a Groundwork which isn't covered by the Veneration buff. I can also imagine scenarios where TP isn't used, or is used on a 10 dura ability, simply because all the groundworks are covered by buffs which can't be delayed.

dazemc commented 3 months ago

Thank you for the quick turnaround! Unfortunately I still get a similar problem even with the changes. Right now, the TP is being placed right after a veneration, pushing a groundwork out of the buff window. Here's a screenshot of the initial guess (Which hits 100% progress and quality), and the result:

image

In this case, I expect the TP to be placed later - on a Groundwork which isn't covered by the Veneration buff. I can also imagine scenarios where TP isn't used, or is used on a 10 dura ability, simply because all the groundworks are covered by buffs which can't be delayed.

Just pushed another update, I'm sick of seeing macros that do not complete progress! I'll need to figure out what to do about TP coming after actions like veneration and waste not. I have an idea of how already.

Envian commented 3 months ago

Unfortunately I'm still stuck getting incomplete crafts. And the TP is still being placed incorrectly.

image

Envian commented 2 months ago

Hey dazemc,

I just now noticed your edit requesting the execution logs - Unfortunately I didn't save any of them from before, and the current solver isn't trying to incorporate TP at this time.

One thing I did notice is that if i took the above two incomplete rotations, removed the instance of TP, the resulting rotation was both complete and fairly good. If I had to guess, fitness/completion was being calculated before TP was added to the rotation.

dazemc commented 2 months ago

Oh yeah I completely reworked how TP and the reward/penalty system works for it. I forgot to ask if you had noticed a difference. TP now gets rewarded the more durability it saves, gets penalized if used past 100% quality but only if it adds to the macro length. I have not implemented a way that explicitly stops less than 100% completion sequences but they are now severely penalized for doing less than 100% progress. I have not seen a "completed" solution with less than 100 or progress but I see it occasionally while it is in the process and that bugs me.

On Mon, Jul 29, 2024, 16:45 Russell Small @.***> wrote:

Hey dazemc,

I just now noticed your edit requesting the execution logs - Unfortunately I didn't save any of them from before, and the current solver isn't trying to incorporate TP at this time.

One thing I did notice is that if i took the above two incomplete rotations, removed the instance of TP, the resulting rotation was both complete and fairly good. If I had to guess, fitness/completion was being calculated before TP was added to the rotation.

— Reply to this email directly, view it on GitHub https://github.com/dazemc/ffxiv-craft/issues/29#issuecomment-2257201510, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH5M2S5WY2BO7OWPT6VWIDZO3H2JAVCNFSM6AAAAABLBPIY2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXGIYDCNJRGA . You are receiving this because you commented.Message ID: @.***>

Envian commented 2 months ago

It looks like its almost fixed - In most scenarios TP is used properly, but only on longer crafts. Looks like its just not step efficent for short crafts, so it gets left out. I did come across one edge case:

image

In this solver, TP was added before veneration. Here's the execution log. I started this solver with an empty guess. It also uses a custom craft - a guess at what the 710 pots will be.

TP Veneration.log

Other than this edge case, it seems as if TP is being used properly. The result is correct - the craft will complete, it just wastes TP.

Edit: Ignore me - I was under the impression that TP only lasted one step - But the solver is correct, itll persist until the next durability action. I think this can be considered solved.

Envian commented 2 months ago

Thank you for the assistance here. This is my favorite crafting tool and I appreciate the work you do for the community.