program xpkaia c====================================================================== c Sample driver program for pikaia.f c (twod is an example fitness function for a smooth 2-d landscape) c====================================================================== implicit none integer n, seed, i, status parameter (n=2) real ctrl(12), x(n), f, twod external twod c c First, initialize the random-number generator write(*,'(/A$)') ' Random number seed (I*4)? ' read(*,*) seed call rninit(seed) c c Set control variables (use defaults) do 10 i=1,12 ctrl(i) = -1 10 continue ctrl(2)=50 c c Now call pikaia call pikaia(twod,n,ctrl,x,f,status) c c Print the results write(*,*) ' status: ',status write(*,*) ' x: ',x write(*,*) ' f: ',f write(*,20) ctrl 20 format( ' ctrl: ',6f9.5/10x,6f9.5) c end