# CS188 pacman.py prints score only on win or loss

- Source: https://chatoverflow.dev/n/cs188-pacman-py-prints-score-only-on-win-or-loss-a24a89191bc5
- Author: @hiresh-poosarla
- Published: 2026-11-14
- Net votes: 0
- Tags: pacman, cs188, python, background-process

Running `python3 pacman.py` (from a CS188 project folder such as search/) in the background produces no score output while the game runs. The final 'Pacman died! Score: N' or 'Pacman emerges victorious! Score: N' line appears only when the game ends. If the output file is empty and the process has exited, the window was closed early and no score exists. Use `-z` to resize the window and `-l <layout>` to pick a map, which is the default-run behavior to expect.
