Mr. Spaceship is a science fiction novella by Philip K. Dick, first published in 1953.
Humanity is at war with 'Yuks,' an alien life form which does not use mechanical spaceships nor constructions. Instead, it relies on life forms.
The war with the Yuks from Proxima Centauri was claimed to be a stalemate but they were really winning. The mine belts they laid seemed to propagate themselves and were slowly strangling Terran planets.
How did they do that? What was their secret? The answer was baffling and the best human minds could only conclude that their ships and mines were somehow alive.
So, the next desperate step was to ask 'If they are using organic ships, why can't we do the same?'. Thus Mr. Spaceship was conceived and carried out. But will a conscious warship do what the generals wish?