allora-network / allora-chain

Node software to run the Allora Network
https://www.allora.network/
Apache License 2.0
78 stars 72 forks source link

Add worker experience to initial regret update #615

Closed kpeluso closed 3 weeks ago

kpeluso commented 1 month ago

Purpose of Changes and their Description

  1. Improve implementation of merit-based sortition -- Calculate percentile with instantaneous scores instead of EMA scores => Faster cycling through actors
  2. Resolve runaway regrets
    1. Create migration to clear off regrets and initial regrets
    2. Apply formula developed by @jmdkastro here
      denominator = std(regrets[i-1, :]) + epsilon
      offset = cnorm - 8.25 / pnorm
      dummy_regret[i] = np.percentile(regrets[i-1, :], 25.) + offset * denominator

      which ensures the topic initial regret reaches an appropriate equilibrium.

  3. Overwrite topic.AllowNegative to false in all topics -- was wrongly set as true somehow

Link(s) to Ticket(s) or Issue(s) resolved by this PR

Are these changes tested and documented?

github-actions[bot] commented 1 month ago

The latest Buf updates on your PR. Results from workflow Buf Linter / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed⏩ skippedOct 14, 2024, 5:56 PM
kpeluso commented 1 month ago

overall new changes lgtm

spooktheducks commented 1 month ago

Not tolerating this kind of response to extremely thorough PR feedback anymore.