mercredi 19 décembre 2018

Dynamic Achievement System algorithm / design

I'm developing this Achievement System and it must have a CRUD, that admins access to create new achievements and it's rules. I need some help with the design & algorithm of this so it can easily evolve with new rules as admins ask.

Rules sample

Medal one: must complete 5 any courses with a score of at least 90
Medal two: must complete two specific courses with a score of at least 85
Medal three: must be top 5 in general ranking at least once
Medal four: must have more than 5000 points

I'll basically store that as metadata in a relational database, probably with these columns below:

  • action
  • action quantity
  • course quantity
  • score
  • id course
  • ranking position
  • points

I want to know if there is any known algorithm / design to this kind of problem? Or perhaps I should store them differently to make it easier? Don't know, I want suggestions.

Aucun commentaire:

Enregistrer un commentaire