Talk:Evolutionary algorithm: Difference between revisions

Content added Content deleted
m (→‎Tacit J solution: use "pure" tacit definition for mutate)
(→‎Tacit J solution: The more the merrier)
Line 15: Line 15:
'''VERSION ONE'''<br>
'''VERSION ONE'''<br>
Uses a user-defined adverb and conjunction that help keep the rest of the code tidy.
Uses a user-defined adverb and conjunction that help keep the rest of the code tidy.
<lang>CHARSET=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
<lang j>CHARSET=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
NPROG=: 100 NB. number of progeny (C)
NPROG=: 100 NB. number of progeny (C)
MRATE=: 0.05 NB. mutation rate
MRATE=: 0.05 NB. mutation rate
Line 33: Line 33:
Only uses verbs (functions) which are can be easier to understand/parse, especially to start with.
Only uses verbs (functions) which are can be easier to understand/parse, especially to start with.


<lang>CHARSET=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
<lang j>CHARSET=: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ '
NPROG=: 100 NB. number of progeny (C)
NPROG=: 100 NB. number of progeny (C)


Line 48: Line 48:
evolve=: nextgen ^: notperfect ^:_ ,:@create</lang>
evolve=: nextgen ^: notperfect ^:_ ,:@create</lang>
--[[User:Tikkanz|Tikkanz]] 00:53, 4 November 2009 (UTC)
--[[User:Tikkanz|Tikkanz]] 00:53, 4 November 2009 (UTC)

: Put them both in, while explaining the ways in which each is better than the other (perhaps with a little more explanatory text than above). It's a shame that there isn't highlighting for [[J]] yet (especially the comments) as that would aid reading. –[[User:Dkf|Donal Fellows]] 08:59, 5 November 2009 (UTC)