[Push] No Name type and Define instructions in psh?

Lee Spector lspector at hampshire.edu
Fri Jun 25 18:49:18 EDT 2010


I meant names as symbols, but there are a couple of things at play here.

Even without names or definitions of any kind you can have something like an ADF, or at least like a function that is automatically defined (even if it's quite different from a Koza style ADF) in Push. If you dup a piece of code and move copies of it around (either on the code stack or the exec stack) and you execute (possibly multiple, possibly modified) copies then you are doing something very much like defining and calling a function. All sorts of exec stack manipulations can produce function-like behaviors.

Push3 names provide a way to associate data items (including code) with symbols that can occur much later, and you don't have to care about what occurs between "definition" and use -- that is, you don't have to maintain or manipulate the stacks to get the data/code to the top at the right time -- you can just use the name. This is the same as the issue with input instructions that I just mentioned on another thread, and in fact if you have names then that's a simple way to get inputs -- just push names and inputs and calls to define instructions on to the front of the program before executing it.

Anyway, it would seem that names (as symbols that can be associated with data items) should be useful.... but I've yet to see evolutionary situations in which their presence clearly helps.

Treating names as entities that can themselves be manipulated, as strings, is something I haven't implemented but would be certainly be cool (whether or not it's useful). You could first build a string type with standard string manipulation instructions and then define something like string.fromname and name.fromstring.

 -Lee



On Jun 25, 2010, at 6:19 PM, PerPlex Ed wrote:

> Are you talking about names per se or about the whole subject of definitions (ADF)?
> 
> Of course, since there is no name manipulation instructions, names are just symbols. There is no way for a Push program to, say, consider the function named 'alpha2' as something related the function named 'alpha' just because their name is similar. So all functions could just be numbered and the usefulness of the name stack is just to have a separate "value space" for definition names.
> 
> 
> Lee said:
> 
>> They're great for demonstrating the language and for writing code manually, but I've tried in vain to produce evolutionary conditions in which they help to solve a problem. I would love to see an example in which they help.
> 
> 
> 
> 
> _______________________________________________
> Push mailing list
> Push at lists.hampshire.edu
> https://lists.hampshire.edu/mailman/listinfo/push

--
Lee Spector, Professor of Computer Science
School of Cognitive Science, Hampshire College
893 West Street, Amherst, MA 01002-3359
lspector at hampshire.edu, http://hampshire.edu/lspector/
Phone: 413-559-5352, Fax: 413-559-5438

Check out Genetic Programming and Evolvable Machines:
http://www.springer.com/10710 - http://gpemjournal.blogspot.com/



More information about the Push mailing list