geneura-papers / 2016-ea-languages-PPSN

Paper on comparing languages for PPSN
Artistic License 2.0
2 stars 4 forks source link

Implemente Griewank's function #14

Open JJ opened 8 years ago

JJ commented 8 years ago

not clear whether we should binary or floating-point number representation, and how many languages should we target. At least

Check out Griewank here https://www.sfu.ca/~ssurjano/griewank.html

iblancasa commented 8 years ago

Implemented in Python https://github.com/iblancasa/PythonEO

pacastillo commented 8 years ago

if possible, we should try both binary and floating-point. That way, we cover canonical GA codign, and also EA coding. However, I don't know how difficult might be implementing that in those languages...

iblancasa commented 8 years ago

What is the difference?

JJ commented 8 years ago

From my initial tests with Griewank, I would say it's so fast it is not worth the while to compare... But we'll have to check. The difference between binary and real is that you have to convert from binary to decimal before applying it. Once again, I would say it's fast enough. Bear in mind that floating point function, at the most, have 100 variables. Onemax has 3 orders of magnitude more.

vrivas commented 8 years ago

For JavaScript (I¡ll do it later): g=function(vector) { return (vector.reduce( function(prev, e) { return prev+(e_e)/4000; }, 0 )) -(vector.reduce( function(prev, e, i) { return prev_Math.cos(e/Math.sqrt(i+1)); }, 1 )) +1 }

vrivas commented 8 years ago

Two other implemementations: g3=function() { var t=Array.from(arguments).reduce( function(prev, e,i) { return { sum: prev.sum+=(ee)/4000 , prod: prev.prod=Math.cos(e/Math.sqrt(i+1)) } }, {sum:0, prod:1} ); return t.sum-t.prod+1; }

vrivas commented 8 years ago

@iblancasa Your implementation in Python: does simply generate random individuals and compute Griewank function? In such a case, are we only testing fitness computation? Thxs

iblancasa commented 8 years ago

@vrivas I follow the case of the onemax benchmark. https://github.com/iblancasa/PythonEO/blob/master/onemax.py

So, really I am calculating the time of generate a new chromosome and the time to run the function. There was an opened issue about the Onemax and split the generation of the chromosome and the measure of the function.

 for i in range(number):
        indi =  random_chromosome(length)
        result = griewank( indi )
iblancasa commented 8 years ago

If you provide a complete example of how you want to run the benchmark, I will adapt to the new format. No problem about :+1:

JJ commented 8 years ago

This is the one https://github.com/JJ/goEO/blob/master/griewank.go

Please provide complete examples or I'll not have time to run them, tally them, analyze them, and add them to the paper.

iblancasa commented 8 years ago

@JJ thanks for the example.

I will adapt some things (use float64)

vrivas commented 8 years ago

@JJ How/why have you chosen the values of DIMENSIONS, i.e., [2,4,6,8,10,20,100]? Wouldn't be better using powers of 2 : [2,4,8,16,32,64,128]? I think this would allow us to use logarithmic graphics (if needed) in a better way

JJ commented 8 years ago

Can be easily adapted...

2016-11-03 9:57 GMT+01:00 Víctor Manuel Rivas Santos < notifications@github.com>:

@JJ https://github.com/JJ How/why have you chosen the values of DIMENSIONS, i.e., [2,4,6,8,10,20,100]? Wouldn't be better using powers of 2 : [2,4,8,16,32,64,128]? I think this would allow us to use logarithmic graphics (if needed) in a better way

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/issues/14#issuecomment-258090123, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAB9NnrQKOdoULIMTh3xsmYs-EuPrBeks5q6aHmgaJpZM4KlYLO .

JJ

vrivas commented 8 years ago

2016-11-03 9:58 GMT+01:00 Juan Julián Merelo Guervós < notifications@github.com>:

Can be easily adapted...

Yes, of course. But choosing the right option now makes easier for you to run the different programs in your computer doing no changes. What do you say?

2016-11-03 9:57 GMT+01:00 Víctor Manuel Rivas Santos < notifications@github.com>:

@JJ https://github.com/JJ How/why have you chosen the values of DIMENSIONS, i.e., [2,4,6,8,10,20,100]? Wouldn't be better using powers of 2 : [2,4,8,16,32,64,128]? I think this would allow us to use logarithmic graphics (if needed) in a better way

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/ issues/14#issuecomment-258090123, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAAB9NnrQKOdoULIMTh3xsmYs-EuPrBeks5q6aHmgaJpZM4KlYLO .

JJ

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/issues/14#issuecomment-258090395, or mute the thread https://github.com/notifications/unsubscribe-auth/AC56mu2z5QZo-UhrYj6qbC8DM0o2EoGEks5q6aJDgaJpZM4KlYLO .

Víctor Manuel Rivas Santos http://vrivas.es

JJ commented 8 years ago

Just do it.

2016-11-03 10:17 GMT+01:00 Víctor Manuel Rivas Santos < notifications@github.com>:

2016-11-03 9:58 GMT+01:00 Juan Julián Merelo Guervós < notifications@github.com>:

Can be easily adapted...

Yes, of course. But choosing the right option now makes easier for you to run the different programs in your computer doing no changes. What do you say?

2016-11-03 9:57 GMT+01:00 Víctor Manuel Rivas Santos < notifications@github.com>:

@JJ https://github.com/JJ How/why have you chosen the values of DIMENSIONS, i.e., [2,4,6,8,10,20,100]? Wouldn't be better using powers of 2 : [2,4,8,16,32,64,128]? I think this would allow us to use logarithmic graphics (if needed) in a better way

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/ issues/14#issuecomment-258090123, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAAB9NnrQKOdoULIMTh3xsmYs-EuPrBeks5q6aHmgaJpZM4KlYLO .

JJ

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/ issues/14#issuecomment-258090395, or mute the thread https://github.com/notifications/unsubscribe-auth/AC56mu2z5QZo- UhrYj6qbC8DM0o2EoGEks5q6aJDgaJpZM4KlYLO .

Víctor Manuel Rivas Santos http://vrivas.es

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/geneura-papers/2016-ea-languages-PPSN/issues/14#issuecomment-258093608, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAB9MEANq5iWlFXD_MFvjVaHWrSWy_Uks5q6aaWgaJpZM4KlYLO .

JJ

vrivas commented 8 years ago

@JJ Just do what? Tell us whether to use powers of 2 or not. I don't know the reasons that led you use that values.

JJ commented 8 years ago

I found them in a paper that evaluated the Griewank function. My point is just use whatever you want, it's very easy to use the other set of values and I can do it here.

vrivas commented 8 years ago

@JJ Ok, thanks. In that case, I'll leave original values (no powers of 2). Php and JavaScript versions are ready.

iblancasa commented 8 years ago

I think that Python too