HPCE / hpce-2017-cw6

2 stars 17 forks source link

questions regarding min(1,exp(-g/t))*log2(n) #19

Closed aaronlws95 closed 6 years ago

aaronlws95 commented 6 years ago

Hi, isn't exp(-g/t) always going to be less than 1 as long as g/t is positive. Why is the min necessary? Also in the code: capture I noticed that g/t is less than 1 most of the time so it never does the exponential.

nicholzk commented 6 years ago

I believe that the code intends to impose a penalty of exp(-g/t) for programs that exceed the time budget on the score ( g/t > 1), else score is simply log2(n). The mathematical formulation is certainly wrong, but I am not sure if there is a simple way to express this logic.

m8pple commented 6 years ago

My intention was as stated by @nicholzk says:

So the cost function I was expecting was something like this: image

So there is quite a big penalty for going over the time budget, with a bit of a cliff, but still some reward. Originally I had min(1,exp(-g/t)/exp(-1)), but then decided to penalise exceeding the budget a bit more - as @nichlzk says, there isn't an elegant way of expressing that, and I seem not to have noticed that the maths no longer follows the function.

Regardig @aaronlws95's point about g/t being less than 1 most of the time: that is because the default prediction of n is extremely conservative. You'll want to try to make a better prediction of n, so that you can get reasonably close to the g/t=1