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 & 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?