Saturday, March 15, 2008

Evolving functional programming in Javascript(II)

In this post, described example of how "mutation" genetic programming term, can be applied for self-modifying functions.

Now I am inspired by idea of genetic programming in application to functional.

This approach is different from "classical" genetic programming approach, where solution to task of optimization is founded, using solutions generated by genetic algorithm, and calculating difference of solution searched, and proposed solution, with use of fitness function.

The idea is following:

- Functions could be supposed as living beings.
- Function code itself, presents it's DNA.
- Mutation can be presented by random change of function part.
- Crossover can be presented by splitting functions to parts and than joining parts of functions together to get new function.

From the existing languages for the prototyping such functional beings, JavaScript, looks like the most convenient for me.

No comments: