Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Make progress bars / stats on dashboard

Open yk opened this issue 2 years ago • 4 comments

We could do two different stats:

  • a progress bar towards some goal (i.e. 5000 completed trees)
  • a distribution of the state of all in-progress trees

we already have these numbers available at /api/v1/stats/tree_manager (maybe we want to select a subset of them)

yk avatar Jan 29 '23 10:01 yk

Working on it

MrlolDev avatar Feb 06 '23 09:02 MrlolDev

any progress on this? it would help trust & motivation greatly.

gilice avatar Feb 15 '23 11:02 gilice

I think a linear progression curve should be a decent rule of thumb estimate for XP thresholds. This means that the difference in xp needed between levels grows linearly (so it does not explode like an exponential solution would see: https://www.gamedeveloper.com/design/quantitative-design---how-to-define-xp-thresholds- ):

For example, with a baseline of 4

Level XP at level XP needed to progress
1 0 4 + 1
2 5 4 + 2
3 11 4 + 3
4 18 4 + 4
5 26 4 + 5

of course one can also use BASELINE + round(alpha * LEVEL) with alpha being slightly > 1.

Here is a naive implementation in python:

max_level, baseline, alpha = 5, 4, 1.
level = np.round(np.cumsum(np.arange(1, max_level) * alpha + baseline))
thresholds = [0] + level.astype(int).tolist()
thresholds
>>> [0, 5, 11, 18, 26]

and your current level is just

current_level = (np.array(thresholds) <= current_points).sum()   # lowest level is 1

and the 0.-1. progress bar is:

if current_level >= max_level:  # or len(thresholds)
    prograss = 1.
else: 
    progress = (current_points - thresholds[current_level - 1]) / (thresholds[current_level] - thresholds[current_level - 1])

sedthh avatar Feb 24 '23 15:02 sedthh

A kind of daily goal for trees /messages would be great too to encourage daily activity. A daily goal per user and a global one (maybe epr language ?)

Dryhb avatar Feb 24 '23 20:02 Dryhb

#2093

AbdBarho avatar Mar 25 '23 16:03 AbdBarho