Users can now specify multiple buyers, allowing the solver to figure out
the best skeleton that could be sold to any of them. This could be
useful for buyers that share a payout.
Some buyers are only available based on a world quality. The solver now
skips buyers if they are not available. This is specified using a new
parameter, which is mutually-exclusive with specifying a specific
buyer.
If no buyer is specified, this world quality must be specified instead to tell
the solver who is around.
If the minimum is 0, then that value will never be allowed to be
negative. Since it is calculated even when that is not the selected
buyer, that prevents overcorrections that should be permitted.
The solver now starts by trying to solve without adding joints or declaring
skeletons chimeras.
Desired buyers are now set as an assumption rather than a linear
expression.
So long as verbose mode is not active, the script will now display the
current skeleton as it tries to search for more solutions.
This feature uses the curses module to create an alternate screen, so
intermediate solutions are not sent to standard output.
This class has the advantage of being usable as a solution printer,
which can print each solution as they are generated. This tends to be
extremely verbose, but may prove useful for debugging.
Instead of using hardcoded parameters, this script now uses argparse to
offer a command-line interface.
This includes help text, short and long option specifiers, and control
over everything from verbosity to the current world qualities.
Occasional Buyer hasn't been implemented yet, but will eventually be a
required parameter.
Buyers are now part of the model, rather than being fixed. This means
that the model can choose from among all buyers and determine the most
profitable option.
Accomplishing this meant replacing the if-else control flow with a large
quantity of half-reified constraints.
These actions are taken after a declaration is made, but before the
skeleton is sold.
Since these actions offer a way of reducing implausibility,
difficulty level has been tweaked to avoid allow lowering it past zero.
Exhaustion from actions is now calculated without regard to the buyer.
Exhaustion from the buyer is stored in an intermediary "Added
Exhaustion" variable, which is added to produce the final exhaustion
value.
This change substantially reduces the complexity of buyer-specific
logic, which will help future improvements.
For the sake of clarity, members of Cost now have terminal values iff
they are assigned an arbitrary cost rather than an actual method of
acquisition.
The primary effect of this change is that items that are purchased from
a shop are given a value in terms of the currency used, rather than a
numeric literal. This makes it much easier to tell where refinements to
the model may be necessary.
This change better reflects the meaning of this enumeration: the cost of
acquiring something is usually greater than the value that can be
extracted from it.
Rather than having a single action list, actions are now added to the
model enumeration-by-enumeration. This allows for more flexibility and
clarity when introducing exceptions to the norm.
Skipping tails is now modelled correctly: it can only be done once, and
doing so removes all remaining tails. As far as the model is concerned,
this means that not all tails need to be filled if tails have been
skipped.
Adjustments made to a skeleton after all parts have been added are now
in a distinct enumeration.
The action list is now entirely composed of enumerations, so it shall be
eliminated entirely soon.
Even discounting ancillary benefits, acquiring a Mammoth Ribcage through Balmoral Woods is substantially cheaper than producing one from scratch with most action values.
The cost of applying each tail has been broken down and moved to value.
Skipping tails remains slightly flawed, and will be cleaned up in the
future.
Appendage has once again been cleaned up and sorted lexicographically.
Removing and skipping tails remain at the bottom, as they must be done
after adding tails.
Due to integer overflow issues, both Value.EYELESS_SKULL and
Value.OBSIDIAN_TAIL now have a value of cp_model.INT32_MAX/2. If this
issue recurs, dividing by successively larger powers of 2 may be
necessary.
Adding joints is allowed at the same time adding appendages is, so it belongs in the Appendage enumeration.
In addition to having its constant cost expressed in terms of Value members, adding joints now expresses
the dynamic cost in terms of Warm Amber.
This particular action should be kept above other actions in the enumeration, as it must be performed
before the extra appendages can be added.
This continues the transition away from a single action list.
Because limbs and tails are not mechanically distinct, they are not going to get their own enumerations.
Due to the number of members ultimately going in this enumeration, they will be moved piecemeal.
The members of Appendage will be temporarily added to the action list like the other enumerations.
This continues the transition away from a monolithic action list.
Like Torso, the members of Skull are being added to the action list as a temporary measure.
Torso.LICENTIATE_SKELETON has been renamed Torso.VICTIM_SKELETON to better align with the corresponding Skull.
The cost of each torso quality is now abstracted into the Value enumeration.
Each step necessary is broken down until a penny value is assigned.
This makes it much easier to understand and potentially customize later.
The Torso enumeration now has its members broken across multiple lines, for ease of reading.
The sources for Thorned Ribcages and Leviathan Frames were changed.
This enumeration will be used to rationalize and centralize costs across the script.
ACTION_VALUE and SURVEY_VALUE have been moved into this enumeration, and more will be added.
For the sake of readability and organization, all of the actions are going to be moved into enumerations instead of being lumped into a massive list literal.
Until every action is transitioned, enumerations will simply be prepended onto the current list.
Some of the torso comments have been cleaned up or expanded.
The Torso subclass is an unnecessary complication that may get in the way of future overhauls, so it has been removed.
Action now has the torso_style property that Torso added, defaulting to None.
Logic based on whether an Action was a Torso now checks if torso_style has a value.