This book would be older than the 50's or 60's, when I read it. It has a planet-destroying entity/creature who tries to destroy a planet. The people on the planet (not earth?) fight back and drive it off. The creature learns to counter the attack and comes back. Then the people learn to rebuff the creature's new attack. This goes back and forth until they are throwing worlds at each other, growing stronger and smarter after each attack. I would like to read it again if still available. Thank You!
There is a space entity which attacks, and attempts to destroy a planet. The reason is the planet finds a sensor the entity needs, and moves it to the planet for research. there is a series of counterattacks and defenses back and forth between the entity and the people on the planet, and the space entity grows more and more dangerous after each attempt, gaining knowledge and power. There are attempts to communicate (for various levels of creepiness and threat). It does not end in them actually throwing planets at each other, but the energy attacks, and the people's rebuffs, are spectacular and dangerous enough to be very memorable. Does it sound familiar?