thoughtstem / morugamu

7 stars 6 forks source link

Generalize the random puzzle generator #21

Closed srfoster closed 6 years ago

srfoster commented 6 years ago

(This is a challenging issue, so don't assign this one to yourself unless you've been involved in the project for a few weeks. Talk to me before you self-assign.)

There's a file called puzzle-generation-attempt. It is capable of generating random puzzles.

However, before we start using this file internally, we'll need to generalize it. It currently has hard-coded some stuff that pertains to boolean algebra puzzles and clock number puzzles. However, this module should really be agnostic about the particularities of any given rule system. Indeed, it should probably take a rule system in as input, and create puzzles based on that.

srfoster commented 6 years ago

Also note, we might be able to use Redex's generate-term for random puzzle generation. I'm investigating this...

srfoster commented 6 years ago

My last push has some demos for redex (boolean algebra and clock numbers).

Hints:

First, see if you can address my comment in clock numbers (i.e. make metafunctions for add~ and sub~).

Second, make a file called random generator. Require the various languages from the other redex files. Provide a function called generate-random, which takes in the name of a language and generates a random term in that language.

Third, document that function under the puzzles section of the docs.

srfoster commented 6 years ago

Great resource:

https://www.leafac.com/prose/playing-the-game-with-plt-redex

srfoster commented 6 years ago

I added a redex file for inequalities, which combines boolean algebra and clock numbers. Also, I added puzzles/random-generation/generator.rkt.

TODO: Make a function (or various functions) in this file that return random puzzle cards for any of the following:

Document any provided functions in internal-docs/morugamu.scrbl.

srfoster commented 6 years ago

This ticket has been split up into various other tickets now. I'll close this one. See the others.