Another dim memory from my sci-fi reading binges in the 1980s... this one almost definitely in one of the big hardback collections full of late Golden Age short stories.
The story is told from the perspective of a robot
(maybe cyborg?) tank that has stopped responding to control signals and is aggressively "defending" some portion of the Moon, to which it was previously assigned. Maybe a war had ended, or maybe it became confused about an exercise that it thought was real?
There was a person trapped in a cave trying to communicate with the tank. The tank mostly ignores him, so the main purpose of what he says is exposition for the reader. I think this person was an expert on this type of robot/cyborg sent to "talk it down", but the tank had attacked, and this guy was the only survivor. The expert was badly wounded -- I think he mentions his suit had to amputate his leg to seal a hole -- or maybe flood it with water which would freeze to seal the hole but mean that his leg had to be amputated later. He keeps trying to convince the tank to stand down, at one point saying that he knew it "back when it was just
a two-wheeler an autocyber in boot camp" or something along that line. (Edit: I must have been reading too fast and/or distracted back then, since per the quote below I seem to have misread "motorcycle" for "autocyber"!)
One detail of the attack stands out -- the tank was low on ammunition, I think, so it used a kind of bomb with an electric/magnetic "catapult" (aka "magnapult") to hit the expert's transport. The tank was proud of itself for figuring out a way to hit it far out of the normal range by 1) using its own top speed to add velocity to the projectile, and 2) building up the catapult's energy past its normal operating range, which caused it pain but made the bomb go much further. It catches the transport by surprise, since they thought they were safely out of range of the armaments it had left.
The premise sounds a lot like a Keith Laumer "Bolo" story, but I'm fairly sure that it's not actually one of them. It had a somewhat grimmer feel to it. I could be wrong, though, since it's been 30 years.