[open] Cumultative Chance for a random event
Hello Henrik again,
I wanted to know if there is a possibility to get a cumultative chance that a random event occurs.
Like the first time its 10% that the event during a trial occurs. If it doesnt occur the chance raises by 10%. So the second time the chance that it occurs is 20%.
If it doesnt occur again it goes up to 30% and so on. If it occurs the chance drops down to 10% for the next time trial.
So lets give an example:
Any time you make a choice, there is the chance that a random event happens. If you decide to take the car to get to a certain location, there is the chance to get in a traffic jam. Each time you choice the car i want it to get more likely that you end up in a traffic jam. Is there any chance to modul that?
Best regards,
Henrik
Comments
Hi Henrik,
Sure, with a bit of scripting this type of thing can be implemented quite easily. However, it seems that you're describing two different scenarios:
What exactly do you want to do?
Cheers,
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
Hi sebastiaan,
Oh I see the problem, my bad. I want the first example. A random event that occurs with increasing chances depending on wether or not it has occured before.
Best regards,
Henrik
Ah, I see. Basically, you will want to maintain a variable, let's called it
[prob], that specifies the probability that an event occurs. Each time that you determine (randomly) whether the event actually occurs,[prob]decreases when it does, and increases when it doesn't, as in the script below:This script assumes that
[prob]has some kind of starting value. And, of course, it depends on the experiment what the logic will be, and how the variable[event_occurs]is used. But in general, this should get you started.Here you see the script in the context of a working dummy experiment:
Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!