[Push] PushGP Code Generation

Lee Spector lspector at hampshire.edu
Mon Oct 10 14:09:35 EDT 2016


Hi Patrik,

You work sounds quite interesting and I'd like to help, and to hear about your progress.

On the issue that you raised, with ephemeral random constants, I think that the Jsh Java implementation may do something different from what is described in the Push 3 language description, which was followed most closely by the Common Lisp implementation.

In the Common Lisp implementation, and also in other more recent implementations (e.g. "Clojush" in Clojure, which is what I work with most), one can get random constants in generated random code by including an "ephemeral random constant" in the instruction set. I believe this is essentially the approach used in Koza's 1992 book, and in the code that he distributed with it. What is an ephemeral random constant? It can be implemented in various ways, but the key thing is that it's something that the code generator recognizes, and when it is picked from the instruction set, it is not itself included in the generated program; rather, a function is called to produce a random value that is included in the generated program in its place. So you could have an ephemeral random constant for integers in the range -100 to 100, and throw that in the instruction set, and when the code generator tries to include it in a program it will instead produce a specific random integer in that range, and include that in the generated program.

Does that answer your question?

FWIW, in many of our implementations, in functional languages, we implement this by including random-constant-generating functions directly in the instruction set. When the code generator picks something from the instruction set it checks to see if it's a function -- if not, then it uses it literally, but if it's a function, it calls it and uses its result. But this is just an implementation detail.

Let me know if this isn't clear, or if you have any other questions.

FYI the push listserv to which you've sent this (and I am replying) hasn't been active for quite a while, because a lot of Push discussion has moved elsewhere. It's fine for you to continue to use it, and in fact your message was a good reminder to me that I should tell other active Pushers that they should subscribe if they are not already subscribed. That said, you might also want to know about https://push-language.hampshire.edu, which is much more active but also not fully public. If you go there now you will only be able to see topics in the public "Orientation" category, but not most of the activity on the site. If you're working with Push enough to want to become a member of the site then I would be happy to add you. However, the reason the site is not completely open is that we want to be free to discuss research and development ideas in roughly the way that one does in a co-located lab, so we don't worry too much about looking foolish for suggesting wacky ideas, or about getting scooped. The idea is to treat it more or less like we're in a university research lab together, rather than in the wide open web. So if I add you as a member, I would ask you to treat it in roughly that way.

Best,

 -Lee




> On Oct 9, 2016, at 5:39 PM, Patrik Kimmeswenger <patrik.kimmeswenger at gmail.com> wrote:
> 
> Hello,
> 
> my name is Patrik Kimmeswenger and I am studying Software Engineering at the University of Applied Sciences in Hagenberg <x-msg://222/pen%20https://www.fh-ooe.at/en/hagenberg-campus/studiengaenge/master/software-engineering/>. Currently I am working on my master thesis with the title "Implementation and Ancestry Analysis of PushGP in HeuristicLab". Thereby I am advised by DI (FH) Miachel Kommenda MSc, a member of the HeuristicLab <http://dev.heuristiclab.com/> team. 
> My implementation of PushGP 3.0 written in C# is already able to parse and evaluate Push programs. At this point I want to thank you for the create language description. It is very detailed and easy to understand. However I have a question regarding Random Code Generation <http://faculty.hampshire.edu/lspector/push3-description.html#RandomCode>. I am not able to understand what is meant by the term "If this is an ephemeral random constant". I took a look at the Java implementation (Jsh) and noticed that a random number is used to determine which random generator should be used whereby a random generator for each data type (integer, float, boolean) exists and another one which is responsible for instructions. This seems to be a nice solution but I don't understand where an "ephemeral random constant" is used?
> 
> Sincerely,
> Patrik Kimmeswenger
> 
> _______________________________________________
> Push mailing list
> Push at lists.hampshire.edu
> https://lists.hampshire.edu/mailman/listinfo/push

--
Lee Spector, Professor of Computer Science
Director, Institute for Computational Intelligence
Hampshire College, Amherst, Massachusetts, USA
lspector at hampshire.edu, http://hampshire.edu/lspector/, 413-559-5352

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.hampshire.edu/pipermail/push/attachments/20161010/514a7361/attachment.html>


More information about the Push mailing list