First Post: Personality Based Simulator
The initial python program, written with Pydroid3, outputted a string (either Jimmy was insulting or Jimmy wasn't insulting) and an associated probability of the string's occurrence. Here, Jimmy beat the odds and became insulting. The final version includes an environmental modifier, Jimmy's stress level. In this output, the stress modifier can lower or raise the base probability of the string occurrence. #The Code import random from itertools import chain action_score1= random.randint(1,5) action1="insulting others" agent_name= "Jimmy" stress= random.randint(-10,10)/10 stress_modifier= stress*0.2 def action_probability(score): match(score): case(1): return 0.1 case(2): return 0.2 case(3): return 0.5 case(4): return 0.6 case(5): return 0.8 def action_probability_mod(score): match(score): case(1): return 0.1+(stress*0.1)