Skip to content

Commit

Permalink
Use 'F' as sentinel token
Browse files Browse the repository at this point in the history
In implementing the random rule generation, I had mistakenly believed
that 'f' meant 'step and draw' while 'F' meant only 'step'. In reality
the opposite is true.

The consequence of this mistake is that most generated rules will result
in pictures with gaps.

This is a partial fix for #83
  • Loading branch information
Notgnoshi committed Apr 25, 2021
1 parent 73d8666 commit 4ae58c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/random-production-rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def generate_lhs_tokens(distribution, rng):
tokens = []
token_pool = list(distribution.keys())
token_probabilities = list(distribution.values())
while "f" not in tokens:
while "F" not in tokens:
tokens.append(rng.choice(token_pool, p=token_probabilities))

return tokens
Expand Down

0 comments on commit 4ae58c1

Please sign in to comment.