I've actually read the story it is based on, but it's been so long I need to revisit it. Problem is, I cannot remember which collection of short stories it appears in.
The original story is "
Second Variety" by Philip K. Dick. I have it in a collection called "
Machines That Kill" (from 1984, edited by Fred Saberhagen and Martin Harry Greenberg, ISBN 0-441-51358-1). The acknowledgments page states:
SECOND VARIETY by Philip K. Dick copyright 1953 by Space Publications, Inc.
While I agree that it is an interesting film, I much prefer the original written story. Of course, for me that's true for just about any movie based on a book or short story.
Philip K. Dick has numerous movies based on his works, including such well known ones as
Blade Runner,
Total Recall, and
Minority Report.
[Edited to fix URLs]