This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TensorFlow, AI, Autopilot, VendeeGlobe
#31
(2024-02-04, 03:43 AM)seandepagnier Wrote:
(2024-02-03, 08:10 PM)Inq Wrote: [*]Learning – It should be pretty easy to create a Back Substitution version and install it on your OpenMarine RasPi.  It would start with the random values in the model (Infant Brain).  It could be completely passive and safe.  You would have to add the hardware for rudder position feedback.  It could run in the background and absorb all the incoming sensor data and take your responses to controlling the helm and start learning and modifying the Model. 
[*]For machine learning:  it is not required.    rudder feedback will be optional, the way wind speed is, as it can be helpful.



I am not sure I understand this reply.  Can you elaborate?   Huh

As I see it, the only input to the system that a human provides is the steering of the helm (Ignoring the sheeting for simplicity for now).  If the AI is entirely meant to mimic a better response at the helm than your current software by learning how a human would steer it, how else would an AI have any way of getting feedback besides rudder position feedback?

I understand, your system does not need that feedback, but I can't see how an AI learning program can do it.

VBR,
Inq

TensorFlow and Recurrent Neural Networks (RNN)

As I mentioned earlier (somewhere) I believe you can get away from having to maintain past data and simply feed the current state of sensors into an AI if a Recurrent Neural Network is used.  This alone would greatly reduce the complexity and coding required.  All that would have to be done is feed the current state of sensor at whatever rate you choose.  I haven't gotten to the stage where I have written this kind of NN, but it is on my TODO list.  Rolleyes

I was curious if TensorFlow had this already built in (since I don't use TF).  Turns out it does - https://www.tensorflow.org/guide/keras/w..._with_rnns

(2024-02-05, 03:08 PM)Hillzzz Wrote: Very interesting benchmarks. the Pi5 is quite a bit faster (up to 3 times faster) than the Pi4 but the Tensor libraries have not been updated for some time so to make everything work on a Pi5 you have to downgrade Python3 to 3.9 as the version in Bookworm doesn't work.

H.


When I ported my C++ code over to the Raspberry Pi's yesterday, I thought something was wrong. I found it very strange the difference between the Pi-Zero-W (1st generation) and the Pi 3B+ was so little, yet the Pi4 was so much greater. Considering, I could make it multi-threaded and probably triple the speed shows there's lots of head room available even on the Zero... at least using C++.

Pi5 - Yes, they've really thrown a monkey wrench in the works. There are lots of changes they made that break old code. They did a piss-poor job of backward compatibility.
Reply
#32
(2024-02-05, 03:28 PM)Inq Wrote: I am not sure I understand this reply.  Can you elaborate?   Huh

As I see it, the only input to the system that a human provides is the steering of the helm (Ignoring the sheeting for simplicity for now).  If the AI is entirely meant to mimic a better response at the helm than your current software by learning how a human would steer it, how else would an AI have any way of getting feedback besides rudder position feedback?

I understand, your system does not need that feedback, but I can't see how an AI learning program can do it.
I explained it.

You said " If the AI is entirely meant to mimic a better response at the helm than your current software by learning how a human would steer it" This is wrong. It is not meant to learn from a human. Humans are not that smart anyway. It is meant to learn how the boat will react given potential rudder movements. That is what it learns. From the ability to predict the future motion of the boat it can decide which movement is best. For this, rudder feedback is optional. Rudder feedback would actually also be optional even if it were mimicking a human's relative rudder adjustments as well but doing this will limit you to the ability of a human and more importantly you wont have much training data unless you do lots of hand steering.
Reply
#33
(2024-02-06, 02:16 AM)seandepagnier Wrote: I explained it.

You said " If the AI is entirely meant to mimic a better response at the helm than your current software by learning how a human would steer it" This is wrong. It is not meant to learn from a human. Humans are not that smart anyway. It is meant to learn how the boat will react given potential rudder movements. That is what it learns. From the ability to predict the future motion of the boat it can decide which movement is best. For this, rudder feedback is optional. Rudder feedback would actually also be optional even if it were mimicking a human's relative rudder adjustments as well but doing this will limit you to the ability of a human and more importantly you wont have much training data unless you do lots of hand steering.

Didn't mean to get your hackles up.

Please understand that I have a great deal of respect for you and what you have done with PyPilot.  Even with my limited exposure (and no hands-on with it yet) it seems obvious, it surpasses many of the big-buck versions already.  In fact, it appears to me that some of those have either (legally) reverse engineered it or (illegally) copied and used pieces of your code... because it was better.  Any competent engineer can design a fighter jet with the modern, limitless budget of compute time, unit testing, and checks and balances.  It takes a great genius to build a Wright Flyer with bailing wire, chewing gum and duct tape and then... go fly it.  Your videos clearly show you are in the latter group.

With your line of thought (where it mainly learns the dynamics of the boat based on your PyPilot controlling it) it will only learn to mimic that of PyPilot.  IOW, never surpassing it.  With the added risk of other boats influences in the Neural Network might cause a contrasting and harmful edge cases.

IMO.  The only case where the potential advantages outweighs the unknown (and hidden numerical) risks is where it ONLY learns from a professional racer and only on their one boat and only used for racing conditions.  And only in that deep-pocket, cutting-edge case where the boat can be instrumented with rudder position and all sail position settings (the other choices the pro racer has control over).  Only then to be used to relieve the racer when the second-string (or no) human helmsmen are available.

And more... IMO.  I think PyPilot would benefit with you using your core strengths and applying your genius to extending it by controlling electric:
  • furling headsails
  • in-mast furled mains
  • sheeting lines
  • boom vangs
A well designed/engineered system could change sail plan due to OpenMarine waypoints or weather changes... even going from up-wind to reach to down-wind sail plans to reefing as necessary.   

Depending on your bent, you could continue to Open Source and continue earning the love and admiration of the world... or monetizing a product and live comfortably (actually extravagantly).  Empowering the Boomers age group (and future generations) to continue sailing into their 70's, 80's and 90's will open many well-healed purses!  Then again... with Google and others paying high 6 (near 7) figure salaries for AI experience, you may be able to leverage that for your own personal gain.   

Either way - I look forward to see what you come up with.  You are the expert.  It is your program, so you can do with it as you wish.  What do I know... I don't have a crystal ball.  I only have 40 years as a C++ developer and aerospace engineer specializing in finite-element analysis, dynamic systems, and frequency response - aka... the Competent Engineer.
Reply
#34
Quote:With your line of thought (where it mainly learns the dynamics of the boat based on your PyPilot controlling it) it will only learn to mimic that of PyPilot.  IOW, never surpassing it.  With the added risk of other boats influences in the Neural Network might cause a contrasting and harmful edge cases.
The issue with harmful edge cases is real, but it would not mimic the current PID algorithm, that would be almost pointless. I think you are missing what I am trying to explain. It would learn the dynamics of the boat and be able to predict boat motion and therefore determine the best way to get optimal steering, and in this way exceed the performance of any human (in theory) and automatically give the best result within the search space.

For example, it would consider what would happen if it steers a little to port, vs starboard vs no input at all, but also considering that it might know in advance it will steer hard to port in a few seconds and do nothing in the moment and so forth. It would not just run the network one time to predict the movement but run it dozens or hundreds of times per frame considering all possible movements and predict the outcome for each of them and find the best one that way.

Quote:IMO.  The only case where the potential advantages outweighs the unknown (and hidden numerical) risks is where it ONLY learns from a professional racer and only on their one boat and only used for racing conditions.  And only in that deep-pocket, cutting-edge
It would exceed the performance of any racer assuming the network fully understands the dynamics. The issue is things like rogue waves and so forth conditions that are rare and have not been fully trained and for this even lots of humans would make mistakes.
Quote: case where the boat can be instrumented with rudder position and all sail position settings (the other choices the pro racer has control over).  Only then to be used to relieve the racer when the second-string (or no) human helmsmen are available.
controlling electric:
  • furling headsails
  • in-mast furled mains
  • sheeting lines
  • boom vangs
I am working on multiple motor control right now. The additional motors could be used for such things as well as others.
Quote:Depending on your bent, you could continue to Open Source and continue earning the love and admiration of the world... or monetizing a product and live comfortably (actually extravagantly).  Empowering the Boomers age group (and future generations) to continue sailing into their 70's, 80's and 90's will open many well-healed purses!  Then again... with Google and others paying high 6 (near 7) figure salaries for AI experience, you may be able to leverage that for your own personal gain.   
I dont know if you are delusional or I am. What I can tell you is I have exactly $2 in my paypal account and less than $2 in cash (a few quarters and dimes). I am perpetually without money foraging for oysters and eating food my friend gave me off his boat when he left it for the winter.
Quote:Either way - I look forward to see what you come up with.  You are the expert.  It is your program, so you can do with it as you wish.  What do I know... I don't have a crystal ball.  I only have 40 years as a C++ developer and aerospace engineer specializing in finite-element analysis, dynamic systems, and frequency response - aka... the Competent Engineer.
Well by all means find issues with pypilot and let me know how to improve it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)