Algorithm selection for controlling a model vehicle I've built an autonomous sailing robot (https://github.com/kolosy/ArduSailor). Turns out, the problem of piloting it is fairly complex, and my procedural approach to solving it hasn't worked well (or at all). I think that an ML-based approach may be better, and I'm trying to figure out the right algorithm to use. 

I'm viewing it as an optimization problem of sorts - I've got a small set of parameters:


Position (lat, lon) 
Orientation (in 9 DOF)
Speed
Wind speed &amp; direction
Distance to waypoint
Heading to waypoint
Sail position (basically winch orientation, a single value between 0 and 180)
Rudder position (same as above)


If I'm thinking about this right, I need to vary my rudder and winch over time in response to my current position, orientation and wind direction to minimize the difference between my orientation and the heading to the waypoint, and minimize the distance to the waypoint. 

My approach right now, is to train an ANN (using this code) by recording a manual run through my course. Is this the right approach and algorithm? Is there a better / more suitable way of thinking about this?
Please, do not use ANN, because what you are looking for actually is SLAM method. It is a set of algorithms working together to localize your ship in an environment and mapping it simultaneously.  

You can find an introduction on the Wikipedia:

https://en.wikipedia.org/wiki/Simultaneous_localization_and_mapping

This is what autonomous cars are using.