Rather than laboriously replicating every fascination the Trifling
Diplomat has, the script now exploits the consistent member names to
generate the list automatically.
This should not have any effect on usage, but will ease future
maintainance.
This buyer actually changes based on a world quality. As such, it has
been implemented in a similar fashion to Occasional Buyer.
The scaling for this buyer's difficulty level has not been established
at the time of this writing, so it is being treated as 0.
The script now uses dictionary unpacking to pass arguments, rather than
explicitly listing each one.
The parser now suppresses missing parameters by default. This means that
the default values of the Solve function can be taken advantage, rather
than having to repeat them for the parser's sake.
Certain declarations now have their value boosted by 15% during
Zoological Mania, rather than just 10%.
The list of declarations is currently hardcoded, and may need to be
updated in the future.
A docstring has been added describing the module's purpose.
__all__ has been added. It is limited to the declarations needed to use
Solve().
The author's name has been added.
Unlike comments, docstrings support runtime introspection and other
features.
The docstrings are arguably a bit sparse, but this is sufficient for the
time being.
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.