Motive.c: The Soul of the Sims (1997)
I wanted to get a feel for the logic so I made a quick carbon copy in JavaScript with a simple UI to play with:<p><a href="https:&#x2F;&#x2F;codepen.io&#x2F;blixt&#x2F;pen&#x2F;ayyjpZ" rel="nofollow">https:&#x2F;&#x2F;codepen.io&#x2F;blixt&#x2F;pen&#x2F;ayyjpZ</a>