Once Upon a Planet (episode)
Wiki PageReal world article(written from a Production point of view) Upon returning to the Amusement Park planet, the Enterprise crew finds that the caretaker has died and the computer has taken over creating havoc. in Memory Alpha