Hi John,

The original code I'm using is a C implementation of Storn's Differential
Evolution (DE) algorithm (http://www.icsi.berkeley.edu/~storn/code.html).
The polynomial function was used as a demo of function fitting by the
algorithm.  The C-code I used was by Peter Turney
(http://www.icsi.berkeley.edu/~storn/code.html#csou).  It (and other
versions) uses the asymmetric cost calculation.

DE lends itself quite well to J implementation - nothwithstanding my
problems with the polynomial cost function :-)  As someone new to J, I'd
very much like feedback on the final version when I complete it.

On an historical note, I used to program in APL on an IBM/360 in the 1970's.
My university also had a few portable APL ttys with acoustic couplers
attached with which you could dial up the system from home. I didn't
encounter anything like that quality of interactivity until many years
later.

Ronan 


On 28/06/2006 15:24, "John Randall" <[EMAIL PROTECTED]> wrote:

> I'm confused here.
> 
> Should Ronan's C code really be
> 
> if (px<-1.0 || px>1.0) result+=(1.0-px)*(1.0-px);
> 
> or
> 
> if (px<-1.0 || px>1.0) result+=(-1.0-px)*(1.0-px);
> 
> The latter is more symmetrical, and is also continuous, which the first is
> not. It's also easily implementable as
> 
> f=:0 >. <:@:*:
> 
> Best wishes,
> 
> John
> 
> 
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> 

--
Ronan Reilly
Department of Computer Science
NUI Maynooth
Maynooth
Co. Kildare
IRELAND

t: +353-1-7083847
e: [EMAIL PROTECTED]
w: http://www.cs.nuim.ie; http://cortex.cs.nuim.ie



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to