Incremental Model

From Esolang
Jump to navigation Jump to search
This is still a work in progress. It may be changed in the future.

The Incremental Model is an experimental incremental (AKA: clicker or idle) game / computational model envisioned by User:Salpynx.

Design

This arose out of a deliberate attempt to create an incremental / idle game mechanic inspired esolang, and ended up being a relatively direct The Waterfall Model clone by way of a single register Minsky machine, and possibly an accidental re-invention of Fractran, or at least something very similar.

Minsky's single register formulation was an obvious choice for having a single value (the click counter) which could get ridiculously large to simulate any number of prime encoded registers, and the Waterfall Model provided a mechanism for control flow and state transitions without a sequential set of instructions.

Description

Memory consists of a single register of clicks (a positive integer count).

A program consists of a set of pets which are deployed to accumulate more clicks, and must consume clicks to remain active. Pets are specified with a name, a starting level, consumption requirement, and a leveling-up bonus multiplier.

The click register can either be initialized to the product of the consumption requirement raised to the power of starting level for each pet, or an initialising level 0 consumption 2 pet can be added to kick-start the program when it immediately levels up. At least one manual click may need to be provided to trigger the initializing pet's level-up bonus, which should then be sufficient to sustain the remainder of the computation.

Every tick, active pets are "fed" clicks by dividing the click register by the product of all active pets' consumption requirement.

Depending on their starting level and how much they have been fed, a pet may level up and trigger their click multiplier. Click multipliers tend to be considerably larger than consumption requirements. The specific trigger for a pet leveling up is that the click register is no longer cleanly divisible by that pet's consumption requirement. To prevent fractional click counts, the pet must level up and provide a large click bonus. This is how clicks are accumulated.

A pet cannot level up in twice in two successive ticks. If a immediate second level-up would occur, the game ends.

Only one pet should level up each tick. (rule taken from TWFM, is this strictly required?)

Converting The Waterfall Model to Incremental Model

1. Discard the first row of TWFM matrix.

2. For each remaining row:

  • Choose a name for the pet.
  • The value in the first column is the pet's starting level.
  • The consumption requirement is the row.th prime number (i.e. the first clock row is 2, the second is 3, then 5, 7, 11 etc)
  • The leveling up bonus multiplier is the product of (column.th prime to the power of column value) for each column.

To add an initializing pet: create a level 0, consumption 2 pet with a level-up bonus equal to the product of every other pets' consumption requirement to the power of its level. As a level 0 pet, it will level up first when the click register first depletes.

Example

name (starting level) -consumption_requirement / leveling-up_bonus_multiplier

Angry Ant     (6) -2 / x2
Bashful Bat   (4) -3 / x1.764K
Cute Cat      (5) -5 / x44.1K
Variable Vole (3) -7 / x1

This is a Truth machine, converted from TWFM.

Implementation notes

Ideally this should be implemented as a playable graphical game with a range of pets to choose from and customise.

External resources