Mem keeps a list of recent items (or keys), so one can avoid close repetitions of items with random choices.
First code examples:
the default minimum number of choices remaining open
make a new mem
maxMems |
maximum number of remembered items/keys |
filter a list of items, keeping a minimum of choices open
filter a dict by keys, keeping a minimum of choices open
the recently used items/keys
add an item/key to the used list
get and set the number of keys to remember