$ python -m classic help
The astronomers of Planet Xiddler are back in action! Unfortunately,
this time they have used their telescopes to spot an armada of
hostile alien warships on a direct course for Xiddler. The armada
will be arriving in exactly 100 days. (Recall that, like Earth,
there are 24 hours in a Xiddler day.)
Fortunately, Xiddler’s engineers have just completed construction of
the planet’s first assembler, which is capable of producing any
object. An assembler can be used to build a space fighter to defend
the planet, which takes one hour to produce. An assembler can also
be used to build another assembler (which, in turn, can build other
space fighters or assemblers). However, building an assembler is
more time-consuming, requiring six whole days. Also, you cannot use
multiple assemblers to build one space fighter or assembler in a
shorter period of time.
What is the greatest number of space fighters the Xiddlerian fleet
can have when the alien armada arrives?
It is always preferable to front-load assembler production. While an assembler could be produced at any point in time, it is always preferable to gain the multiplicative effect earlier. If an assembler is set to produce fighters, it should never produce assemblers again, because it would have been more efficient to produce that assembler earlier. Furthermore, if an assembler to set to produce fighters, in the next cycle all assemblers will be set to produce fighters. Essentially, the problem is when to switch production from assemblers to fighters. This also reduces the complexity of the problem. Instead of hour-by-hour choices, the strategies will be formed by blocks of 6 days (the time required to produce an assembler). As an example, there are two strategies to produce 4 assemblers.
$ python -m classic
Built 7864320 fighters with 32768 assemblers
* 0 fighters were built concurrent to the assemblers
* 7864320 fighters were built in the unconsumed 240 hours
See also python -m classic test
and python -m classic dump
.