User:ElijahPepe/Artificial intelligence in The Sims

In The Sims series of games, artificial intelligence (AI) refers to the autonomous systems that guide the series' virtual people called "Sims".

Motives in The Sims and The Sims 2
The Sims (2000) established a motives system in which players must adhere to a Sim's hunger, comfort, hygiene, bladder, energy, fun, social, and room needs. For example, a Sim's social needs can be increased by visiting a neighbor, while their hygiene needs can be met by taking a shower. In The Sims, if a Sim's hunger need is unmet, the Sim will die; in any other case, the Sim will become unhappy. Game developers Andrew Rollings and Ernest Adams describes the main challenge of The Sims as managing "slightly incompetent" Sims. While The Sims is based on Maslow's hierarchy of needs, its eventual successor, The Sims 4 (2014), breaks away from this concept.

The Sims introduces autonomy by representing needs in an urgent sense and exposing the objects in the environment—and thus their properties—to the Sim. Most objects in The Sims broadcasts an action and its reward. A refrigerator, for instance, may state that a Sim can "prepare food" there, satisfying the hunger need. Actions are decoupled from objects; in the case of a refrigerator, a broken refrigerator will not advertise that food can be prepared there and instead will broadcast that it must be fixed. The significance to the Sim is expressed by scoring it across all needs and then selecting the highest ranking action or randomly selecting the top ranking actions. Game developer and Maxis employee Robert Zubek lays out several scoring models, where the future value is defined as $$future\ value_{need} = current\ value_{need} + advertised\ delta_{need}$$. The broadcast approach is an extension of fuzzy logic.

Zubek suggests several additional ways to select actions, including distance—in which he proposes a distance-based attenuation formula around the final score, such as $$D(x) = \frac{x}{distance^2}$$, but reserves that such a system may result in a Sim selecting a worse action that is nearby rather than a better one far away if not tuned properly, filtering—such as avoiding advertising actions such as the "cook" action on stoves to children, appealing to need decay and personality types, and tuning the attenuated function using a piecewise linear function in a spreadsheet.

The Sims was developed using a virtual machine and development environment toolkit known as Edith. In a Northwestern University paper, Maxis co-founder Will Wright details the Joy Booth, an object in The Sims akin to the Joy Booths in A Mind Forever Voyaging (1985) and the Orgasmatron in Woody Allen's Sleeper (1973). The Joy Booth is an intentionally addictive object—one that Wright compares to "SimHeroin"—because of its high advertisement values. It increases fun, social, and mood needs while decreasing hygiene, but its high values take away from other actions that may increase social needs. In developing the Joy Booth, Wright notes that early versions of the object were so addictive that Sims would "continue using it until they collapsed".

Commodities in The Sims 3 and The Sims 4
The Sims 3 (2009) significantly altered autonomy and artificial intelligence. In deciding how to perform actions, The Sims 3 branched out performing actions across Sims on lots. Lots may also have motives, such as restaurants preferring more Sims at lunch time rather than mornings or nights. Whereas The Sims and The Sims 2 (2004) works out every action on every object to score it—an inefficient approach when a Sim has filled one or more of its motives, The Sims 3 stores a map of objects that could satisfy a commodity, or need. The Sims 3 also auto-satisfies commodity curves for background Sims until they enter the foreground yet progress with regards to high-level events, such as marriage. Cities may have their own desires, such as to maintain a proper gender ratio and employment rate.

The Sims 3 removed personality meters with traits, a feature continued in The Sims 4 (2014). For example, Sims may seek to be more evil if they have the "Evil" trait or more flirtatious with the "Romantic" trait. With regards to commodities, Sims with certain traits may favor actions that suit those traits. In some hard-coded situations, Sims will follow social norms and expectation. In The Sims Medieval (2011), Sims receive work-related tasks at work and loses them when they go on break.