Utilitarian AI operates by defining a "utility function"—a mathematical tool that assigns a value to possible outcomes, encoding what the AI should strive to maximize, such as collective happiness, efficiency, or lives saved. The AI then evaluates potential actions and selects the one predicted to yield the highest aggregate utility score.