I would like to create a challenge for Community users as described below. I would welcome comments and suggestions from the Community as to how to improve the description of the challenge, or its structure.
The aim of the challenge will be to create a WL code generator capable of producing one-liner programs that are 'sufficiently interesting' to place (i.e. 1st, 2nd or 3rd) in the Mathematica one-liner competition. It is up to the developer to decide what 'sufficiently interesting' means in this context.
A monetary reward will be offered to the participant whose generator-produced one-liner is placed in a future Mathematica one-liner competition.
[Question for moderators: is the proposed challenge permissible?]
1) The challenge is to write a program capable of generating WL code of a specified maximum number of characters in a single line of code
2) The generator program must be written entirely in WL and produce code that is 100% WL
3) No external libraries or datasets may be used either in the generator program or in its output code (WL libraries and datasets are allowed)
4) All code produced by the generator program must be executable in MMA v12.3
5) The generator program should include logic to test generated code to ensure that it is executable
6) In addition to the character length parameter, a second parameter of the generator program should specify the type of required output (e.g. chart, animation, formula, etc)
7) The generator must be capable of producing an unlimited number of one-line WL programs
8) Execution speed should be a consideration in the design of generator program (hence consideration of parallel or GPU processing, for example)
This is not intended to be prescriptive: however, I envisage a genetic programming algorithm performing a local tree search using the WolframLanguageData function, combined to with a 'random jump' algorithm to explore branches of the tree that are farther afield.
The point, of course, is not to win the Mathematica one-liner competition. That's just a benchmark - I see it as a kind of mini Turing test in Computer Science.
The ultimate goal is to see if we can create an engine that can program itself to produce interesting/useful software.
I didn't envisage that the program generator would create a question, as such. It would simply generate a single, random line of WL code that produces "interesting" output of some kind.
I envisage the generator function taking perhaps two parameters. The first would specify the max no of characters in the generated WL code (or else we could see a "one-liner" comprising 100,000 characters of code!). The second would specify the form of output that the generated code would produce, such as a graphic, a manipulate, a 3D plot, or formula. So it might look like this:
genCode = WLGenerator[250, "Formula"]
which might produce an expression, say:
genCode = "Exp[i*Pi] ", which could be evaluated to produce the result -1.
Don't ask me how WLGenerator decides that the above expression is "interesting" - that's part of the challenge!
I suppose one could create a WL Generator function, have it produce a bunch of expressions, tag each of them as interesting or uninteresting and then use that data to build a ML model to try to learn which is which.
Hi Jonathan, not clear to me should it create a question in natural language and give a Wolfram expression as the answer?