The Ukrainian army attacked the Russian army for the first time on 24 August with a new weapon, the Palianytsia drone missile. [Palianytsia is a traditional Ukrainian bun; this word is difficult for Russians to pronounce correctly, so it is used as a shibboleth – ed.]
Most fancy missiles do that already. You could teach it the map of the area and tell it to follow a river bed for such and such time then head to target, for example.