What is the average length of a game of chess with only random moves? The famous Shannon number, 10^120, an estimated lower bound on the number of possible chess games, is based on the assumption that a typical game lasts 40 moves.

In games between skilled human players, this average game length seems to be about right (see this question), but if we want to count all possible chess games, then we also have to include the vast majority of games where the moves don't have any purpose or sense whatsoever. Such a game with random moves would surely be likely to last more than 40 moves?

So what is the average game length of a random game? This should be easy enough to simulate on a computer.
I reran the script from the answer GloriaVictis linked.

For a twenty-five thousand games the average length was 357 ply.