GithubHelp home page GithubHelp logo

lotterysim's Introduction

title author date
darkfi lottery simulation
ertosns
11/1/2023

simulate darkfi consensus lottery with a discrete controller

discrete pid controller.

control lottery f tunning paramter

$$f[k] = f[k-1] + K_1e[k] + K_2e[k-1] + K_3e[k-2]$$

with $k_1 = k_p + K_i + K_d$, $k_2 = -K_p -2K_d$, $k_3 = K_d$, and e is the error function.

simulation criterion

find $K_p$, $k_i$, $K_d$ for highest accuracy running the simulation on N trials, of random number of nodes, starting with random airdrop (that all sum to total network stake), running for random runing time.

alt text

notice that best parameters are spread out in the search space, picking the highest of which, and running the simulation, result in with >33% accuracy

alt text

comparing range of target values between

notice below that both y,T in the pallas field, and simulation have same range.

alt text

conclusion

using discrete controller the lottery accuracy > 33% with randomized number of nodes, and randomized relative stake. can be coupled with khonsu1 to achieve 100% accuracy and instant finality.

Footnotes

  1. https://github.com/ertosns/thunderbolt โ†ฉ

lotterysim's People

Contributors

ertosns avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.