MazeHashFunction.sol, labyrinth hash function implementation on Ethereum

in ethereum •  6 years ago  (edited)

I had the idea for a "maze hash function" around a year ago, inspired by BitLattice. The state is a nearly infinite source of random numbers (limited only by the size of the state), and a resource that is not being used in that way. It's an unused resource.

The labyrinth function is like putting a mouse in a labyrinth, and seeing where it ends up. You use a seed treasureMap as a map, and then navigate through the state based on it, and return a random number based on the path you took and the position you started from.

You can probably see how, given enough distances traversed, you get a very random output.

It's very simple. At the moment you have these massive blockchains with a lot of randomness in them, complexity, and its not being used. Also, from every single point, every single transaction, you have unique paths, so there's no way to learn how to predict the outcomes of labyrinths.

On Ethereum only the past 256 blocks are accessible from a smart contract. I had the idea from BitLattice, and that a much larger part of the state could be accessed by the hash function.

Explain it like I am a person with a map travelling to different places

If you have a map with coordinates, you follow each coordinate, and at every position you end up, you take some data that is only available at that position, and combine it with your current coordinate, mutate it, to generate the next point to travel to, and you follow every single coordinate in your map until you reach the end.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!