DraqueT / PolyGlot

PolyGlot is a conlang construction toolkit.
MIT License
389 stars 44 forks source link

[BETA] Word generator: inconsistent "Too restrictive cluster settings" errors #1113

Closed TrapinchO closed 2 years ago

TrapinchO commented 2 years ago

DEV TEXT Up number of acceptable recursions without results before failing for word generation.

ORIGINAL TEXT Polyglot version: Windows BETA from 10th January 2022 (latest as of writing this)

Steps to reproduce: 1) go to Word Generator 2) delete all categories, illegal clusters, rewrite rules and syllable types 3) set C=12 as category, 12, 21, 2 as illegal clusters and C, CC as syllable types 4) set Monosyllable frequency to higher value, say Frequent (to make it more consistent) 5) click on Generate Values or Sample Text repeatedly, until it both succeeds and fails

DraqueT commented 2 years ago

This is unfortunately an artifact of the nondeterministic nature of the Zompist generation algorithm. The original does not support illegal clusters and does not allow the user to set number of words to generate. With the new enhanced features, this check had to be implemented as a heuristic to prevent infinite processing scenarios, and since the potential word space is being explored at random, there's no certain way to know when to stop. So PolyGlot simply makes its best guess.

I've significantly decreased its processing time with some of the recent modifications though, so I can bump the setting here up pretty significantly. The problem is not unfortunately fixable in principle, but it can absolutely be reduced in frequency.

DraqueT commented 2 years ago

Additionally, clarifying error text.