Author

Topic: How does kimotos gravity work ? (Read 482 times)

hero member
Activity: 718
Merit: 545
February 15, 2014, 11:29:29 AM
#4
I agree with Exbuhe27, it is some kind of 'Simple Moving Average', to smooth out the HASH rate curve.

http://en.wikipedia.org/wiki/Moving_average

Whether it is a Simple, Cumulative, Weighted or Exponential average I'm not sure.

Looking at the algo, it seems similar to the Exponential Moving Average, since it has (1-a)^k which is 'like' the code he uses.. and seems to fit in with the whole 'Gravity Well' thing  Tongue

I have looked for the specific numbers he uses in the code,

https://github.com/megacoin/megacoin/blob/master/src/main.cpp#L1276
 
And the only place 0.7084 seems to appear is..

http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.10.7822&rep=rep1&type=pdf

But no concrete answer as to why he chose those particular values..
legendary
Activity: 1526
Merit: 1000
the grandpa of cryptos
February 15, 2014, 09:17:35 AM
#3
thanx! ive also read KDC Klondike has it and something else [cant remember now] but i couldnt understand it. Seems its not as simple as i could expect Smiley Maybe someone will chime in to the thread to explain more
newbie
Activity: 27
Merit: 2
February 15, 2014, 08:04:57 AM
#2
Hmmm, I read the MegaCoin forum post on it - but I can't seem to actually find the math they use for it. https://forum.megacoin.in/index.php?topic=893.0
It only explains the problem it's trying to solve.

If I had to guess, it probably is just an algorithm that adjust difficulty based on the last x blocks continuously instead of every 2016 blocks - so every block it looks at the last 2016 blocks and decides what the new difficulty should be.

They probably have it setup so that multiple running averages are taken - say the last 2016 blocks is weighted a bit, and then the last 1008 blocks, and the last 504 blocks, or something like that. You could even have this measure be more continuous, as in take the average from the last n blocks where n runs from 1 to 2016, and say that that calculated average contributes to the weighted average in a way proportional to how many blocks it takes into account.

The problem I see with this is that it gives you too much control over how quickly blocks are generated - I think I read somewhere that the lower the variance is in block generation time, the easier it is to fork the chain? Not sure on that, a quick google search didn't bring up any results.

Either way, I really would like to see what specific algorithm they used for it - I'll have to peek through the source a bit. They shouldn't design a new one from the ground up, because there are already really really good algorithms designed by engineers/physicists who work with signal-response feedback controlled systems, and any one of those could work really well I think. Things like Kalman Filters http://en.wikipedia.org/wiki/Kalman_filter

But still then, the worry I think is it being too good - though I think you could have a filter like this target a desired variance in block-time fairly well.
legendary
Activity: 1526
Merit: 1000
the grandpa of cryptos
February 15, 2014, 07:19:29 AM
#1
I see its added to many scrypt coins.
Where can i read more about implementation and this alghoritm itself ?
Jump to: