doxxx / ffxiv-craft-opt-web

Web frontend for FFXIV Crafting Optimizer service.
zlib License
224 stars 198 forks source link

Solver seems to find a worse solution than initial solution #214

Closed kotarou3 closed 6 years ago

kotarou3 commented 6 years ago

Required Information

Class: ALC Level: 21 Craftsmanship: 143 + 5 = 148 Control: 119 CP: 231 + 23 = 254 Recipe Name: Enchanted Silver Ink Recipe Level: 23 Solver Seed: 169655

Initial guess monte carlo result:

Seed: 204092, Use Conditions: true

Monte Carlo Example
===================
 # Action                           DUR    CP      QUA      PRG    IQ  WWYW   CTL  QINC  BPRG  BQUA   WAC       Cond   S/F
 0                                   40   254        0        0     0     0   119     0     0     0     0     Normal     0
 1 Inner Quiet                       40   236        0        0     0     0   119     0     0     0     0       Good     1
 2 Careful Synthesis                 30   236        0       28     0     0   119     0    28     0     0     Normal     1
 3 Manipulation                      30   148        0       28     0     0   119     0     0     0     0     Normal     1
 4 Steady Hand II                    40   123        0       28     0     0   119     0     0     0     0     Normal     1
 5 Hasty Touch                       40   123       69       28     1     0   119    69     0    69     0     Normal     1
 6 Hasty Touch                       40   123       69       28     1     0   143     0     0    77     0       Good     0
 7 Hasty Touch                       30   123      184       28     2     0   143   115     0    77     0     Normal     1
 8 Great Strides                     30    91      184       28     2     0   167     0     0     0     0       Good     1
 9 Standard Touch                    20    59      502       28     3     0   167   318     0   212     0     Normal     1
10 Great Strides                     20    27      502       28     3     0   190     0     0     0     0     Normal     1
11 Byregot's Blessing                10     3      798       28     0     0   190   296     0   296     0     Normal     1
12 Careful Synthesis                  0     3      798       56     0     0   119     0    28     0     0     Normal     1
Progress Check: true, Durability Check: true, CP Check: true, Tricks Check: true, Reliability Check: true, Cross Class Skills: 5, Wasted Actions: 0

Monte Carlo Result of 5000 runs
===============================
                          DUR    CP      QUA   PRG   HQ%
##     Expected Value:      0     3    779.8  56.0  36.3
##       Median Value:      0     3    802.0  56.0  27.0
##          Min Value:      0     3    165.0  56.0   4.0

##       Success Rate:  100.0 %

Expected Behaviour

Solver returns initial guess if it can't find any better solutions

Actual Behaviour

Returned the following worse solution

Seed: 17843, Use Conditions: true

Monte Carlo Example
===================
 # Action                           DUR    CP      QUA      PRG    IQ  WWYW   CTL  QINC  BPRG  BQUA   WAC       Cond   S/F
 0                                   40   254        0        0     0     0   119     0     0     0     0     Normal     0
 1 Careful Synthesis                 30   254        0       28     0     0   119     0    28     0     0     Normal     1
 2 Great Strides                     30   222        0       28     0     0   119     0     0     0     0     Normal     1
 3 Steady Hand II                    30   197        0       28     0     0   119     0     0     0     0       Good     1
 4 Standard Touch                    20   165      260       28     0     0   119   260     0   173     0     Normal     1
 5 Great Strides                     20   133      260       28     0     0   119     0     0     0     0       Good     1
 6 Waste Not                         20    77      260       28     0     0   119     0     0     0     0     Normal     1
 7 Standard Touch                    15    45      433       28     0     0   119   173     0   173     0       Good     1
 8 Hasty Touch                       10    45      537       28     0     0   119   104     0    69     0     Normal     1
 9 Standard Touch                     5    13      623       28     0     0   119    86     0    86     0       Good     1
10 Careful Synthesis                  0    13      623       56     0     0   119     0    28     0     0     Normal     1
Progress Check: true, Durability Check: true, CP Check: true, Tricks Check: true, Reliability Check: true, Cross Class Skills: 4, Wasted Actions: 0

Monte Carlo Result of 5000 runs
===============================
                          DUR    CP      QUA   PRG   HQ%
##     Expected Value:      0    13    531.2  56.0  13.9
##       Median Value:      0    13    502.0  56.0  12.0
##          Min Value:      0    13    259.0  56.0   6.0

##       Success Rate:  100.0 %

Execution Log

WARNING: Maximum length limit of 15 is in effect!

Seed: 169655

Crafter:
  Class: Alchemist
  Level: 21
  Craftsmanship: 148
  Control: 119
  CP: 254
  Specialist: false

Recipe:
  Level: 23
  Difficulty: 39
  Durability: 40
  Start Quality: 0
  Max Quality: 1169
  Aspect: none

Settings:
  Max Tricks Uses: 0
  Reliability: 100%
  Use Conditions: true
  Algorithm: eaComplex
  Population: 3000
  Generations: 100
  Penalty Weight: 10000
kotarou3 commented 6 years ago

...I just realised that the initial solution used 5 cross class skills, while lv21 only has 4 slots. That would explain it.