system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How is a computer programmed to *not* play a game optimally? (Chess, for example)

For reference, on lichess.org, you can play against the machine. You must choose a "level" to play on from 1-8. How is the programming different between each of these levels?
gpt
Many programs work by searching through  thousands or even millions of possible moves.  Not just what move is next, but what will happen after that, and what will happen after that. When you reduce the computer's level, you tell it to examine fewer possible moves, less far into the future, before making its decision.