So lets say there's a game that has a 'life bar' that consists of theoretical levels. As the user performs specific actions, depending on accuracy of their actions, the life bar grows at a corresponding speed. As it grows and goes into next levels, the criteria for desirable actions change and so the user now has to figure out what those new actions are, to keep the bar growing instead of shrinking. And while the user tries to learn which actions/patterns result in growth, things like 'time' along with undesirable actions slowly bring them back down.
I'm wondering if anyone knows of any open-source games that may have similar logic.
Or perhaps if there's a name for this type of logic so I can try and find some algorithms that may help me set something like this up.
TIA
-added
As it seems there's probably no technical term for something like this, perhaps someone can suggest some pseudo top level logic. I've never built a game before and would like to raise my chances of heading in the optimum direction.