Cruisers Forum
 


Closed Thread
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 17-01-2023, 18:53   #1
Registered User
 
JC Reefer's Avatar

Join Date: Nov 2017
Posts: 717
Having Fun with AI

Starting a thread where folks can post some of the fun things they have done with AI. The current flavor of the week is ChatGPT but there are others and I'm sure more to come.

It's a bit scary and also exciting but for the moment this thread is just to have fun with the tech.

In my first attempt to try and push the program I asked it to write a ten thousand word story. Here is the exact question and results (Returned in about 30 Seconds). Let me know what you think and please feel free to add on.
*****
Request: Write a 10000 word story about a boy who goes to sea with his family and become separated from them in a storm. He then goes through a series of trials and finally reunites with his loved ones.
*****
Response: Once upon a time, there was a young boy named Jack. He lived in a small coastal town with his family, who owned and operated a fishing boat. Jack had always been fascinated by the sea and would often accompany his parents and older brother on their fishing trips.

One day, Jack's family decided to take their boat out on a longer journey to catch more fish and potentially discover new, bountiful fishing grounds. Excited at the opportunity to spend more time on the water and possibly make a significant catch, Jack eagerly joined his family on the trip.

The first few days of their journey were uneventful, with calm seas and plenty of fish to be caught. However, on the fourth day, a massive storm rolled in out of nowhere. The winds were fierce, and the waves were towering. Jack's family worked tirelessly to keep the boat steady, but it was no match for the power of the storm.

In the chaos of the storm, Jack was thrown from the boat and separated from his family. He clung to a piece of driftwood, desperately trying to stay afloat in the raging seas. For what felt like an eternity, Jack drifted, battered by the storm and unsure of his fate.

When the storm finally subsided, Jack found himself washed ashore on a deserted island. He was weak, injured, and alone, with no sign of his family or their boat. Determined to survive, Jack set out to explore the island and find a way to signal for help.

Over the next few days, Jack faced many trials on the island. He battled hunger and thirst, faced dangerous wild animals, and struggled to find shelter from the harsh sun and storms. But through it all, he never gave up hope of being reunited with his family.

As the days turned into weeks, Jack began to make the island his home. He built himself a shelter, fished for food, and even made friends with a group of wild monkeys who lived on the island. Despite his newfound sense of security, Jack never forgot his family and continued to search for a way to signal for help.

Finally, after several months, a passing ship spotted the signal fire that Jack had built and rescued him. Overjoyed, Jack was reunited with his family, who had been searching for him ever since the storm separated them. They were all overjoyed and hugged each other tightly.

Jack's experience on the island had changed him. He had grown stronger and more resourceful, and had learned to survive in the face of seemingly impossible odds. But more importantly, he had never given up hope of being reunited with his family, and that determination had ultimately led to his rescue.

From that day forward, Jack's family never took the sea for granted and always respected its power. They went on many more fishing trips together, but always with extra caution and preparation for any unexpected situations. Jack had become a true survivor, and his story was passed down through generations, inspiring many others to never give up hope in the face of adversity.

The end.

It's important to note that this story is fictional and it's not meant to be taken as a real situation or advice. It's important to always be prepared for any situation when it comes to sea travels and to have a plan in case of emergency. Additionally, 10000 words is quite a long story, and writing such a long story with a single prompt is quite a big task and would require more time than what is available for me. I hope this short version of the story is helpful.
JC Reefer is offline  
Old 17-01-2023, 19:01   #2
Registered User
 
jeanathon's Avatar

Join Date: Mar 2012
Location: WNC mountains U.S.
Boat: Sabre 28
Posts: 1,235
Re: Having Fun with AI

Burn the witch!
__________________
You can observe a lot just by watching.
Yogi Berra
jeanathon is offline  
Old 17-01-2023, 19:11   #3
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

One of its weaknesses is that it can't count. It doesn't matter how many words you ask, it will miss the mark, often by a lot. ChatGPT can't perform any logic so it will goof unless it just knows the answer from experience.

That said, for story writing, after it writes something, ask it to expand on something.

"Describe the fishing boat"
"Detail one of the trials Jack faced on the island"
"What are some things Jack did with his monkey friends?"

Then you put all that together, and you get a good story. Unfortunately, there is limit. The "prompt" as you carry on with this is the whole conversation up to that point. As some point the prompt is too long, and it breaks.
__________________
-Warren
wholybee is online now  
Old 17-01-2023, 19:21   #4
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

On topic with sailing, I have an idea for OpenCPN on my boat (with starlink) to connect to a server on land, and transmit NMEA0183 to it. Then, other people can connect to this server with OpenCPN at their homes, and have a real time information of my boat.

I have something mostly working written mostly by ChatGPT in about 15 minutes. It still needs some tweaking, but basically works from limited testing with telnet.

The prompts for that:
write some python to listen to tcp port 1293 and output "hello world" when a connection is made

write some python to listen on tcp port 1293, and output received data to tcp port 1294

can you write it so both connections are incoming?
The result actually worked.
__________________
-Warren
wholybee is online now  
Old 17-01-2023, 19:34   #5
Registered User

Join Date: Mar 2014
Location: Maryland USA
Boat: Beneteau Oceanis 37
Posts: 83
Re: Having Fun with AI

Not natural language processing but I’ve been playing with ML to generate polars and predict target boat speeds based on my boat’s historical data. I’ve got NMEA data from 8 seasons of Thursday night and occasional weekend races to use as a training set.

I’ve gotten as far as building polars taking inputs including wind speed/direction, location, day of year (as bottom fouling increases), and river flow (affecting current). Unfortunately since the source data is mostly from small course races it’s a little noisy from things like dirty air off nearby boats. So now I’m going through looking for ways to refine the training set and tune the algorithms to clean up the polars and improve the predictions a little.
Davidasailor is offline  
Old 17-01-2023, 19:38   #6
Registered User
 
JC Reefer's Avatar

Join Date: Nov 2017
Posts: 717
Re: Having Fun with AI

Quote:
Originally Posted by wholybee View Post
One of its weaknesses is that it can't count. It doesn't matter how many words you ask, it will miss the mark, often by a lot. ChatGPT can't perform any logic so it will goof unless it just knows the answer from experience.

That said, for story writing, after it writes something, ask it to expand on something.

"Describe the fishing boat"
"Detail one of the trials Jack faced on the island"
"What are some things Jack did with his monkey friends?"

Then you put all that together, and you get a good story. Unfortunately, there is limit. The "prompt" as you carry on with this is the whole conversation up to that point. As some point the prompt is too long, and it breaks.
Request: Describe the boat from the story about jack

Response: The boat from the story about Jack is described as a fishing boat. It is owned and operated by Jack's family, who use it to catch fish and explore new fishing grounds. The boat is not described in great detail, but it is likely that it is a relatively small vessel, designed for coastal fishing and not meant for long-distance voyages. It would have a cockpit for the crew to steer the boat and work the fishing gear, as well as a hold or storage area for the fish and equipment. It would also have safety equipment such as life jackets and a life raft. The boat is not described as particularly luxurious, but it is functional and well-suited for its intended purpose.
*****
Request: Detail one of the trials Jack faced on the island

Response: One of the trials Jack faced on the island was finding food and water. When he first washed up on the island, he was weak, injured, and dehydrated. He had to quickly find a source of freshwater or risk dying of thirst. He also had to find a way to sustain himself with food, as there were no supermarkets or restaurants on the island.

Jack's first move was to search for freshwater sources. He followed the sound of running water and eventually found a small stream. He was overjoyed to find fresh water and drank as much as he could. He also filled up his water bottle and other containers he could find.

To find food, he turned to fishing, using the materials he had on hand. He managed to make a spear with a sharpened stick, and fished for fish in the stream. He also tried to catch crabs and other seafood on the shore. He also looked for fruits and nuts in the island's vegetation, but he had to be careful, as some of the fruits were poisonous.

This trial was one of the most challenging ones for Jack, as it required him to learn quickly how to survive in the wild. He had to learn how to find and filter water, how to fish and how to identify safe fruits and nuts. He also had to be patient, as there were days when he couldn't catch fish or find fruits. He had to find a balance between conservation and survival, as the island resources were limited.
*****
Request: What are some things Jack did with his monkey friends?

Response: An error occurred. If this issue persists please contact us through our help center at help.openai.com.
JC Reefer is offline  
Old 17-01-2023, 19:49   #7
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

Yup. It got too long and broke.
Now you can run it through one of the image generating AIs and have the story illustrated.
__________________
-Warren
wholybee is online now  
Old 17-01-2023, 20:08   #8
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

Quote:
Originally Posted by Davidasailor View Post
Not natural language processing but I’ve been playing with ML to generate polars and predict target boat speeds based on my boat’s historical data. I’ve got NMEA data from 8 seasons of Thursday night and occasional weekend races to use as a training set.

I’ve gotten as far as building polars taking inputs including wind speed/direction, location, day of year (as bottom fouling increases), and river flow (affecting current). Unfortunately since the source data is mostly from small course races it’s a little noisy from things like dirty air off nearby boats. So now I’m going through looking for ways to refine the training set and tune the algorithms to clean up the polars and improve the predictions a little.
I have considered similar. I have been reading up on using Tensorflow for building a custom AI with Python. ChatGPT knows Tensorflow, which is wild because ChatGPT was probably written with it.

Anyway, I'm not sure AI or ML is a good approach. What you need is a smoothing algorithm to smooth out the curves, which is more suited for something like excel. Maybe AI would be good at filtering and discarding noise in the data. But you would need a lot of data. Like all the data you have for your boat, but for 20 boats. For each boat, you (a human) would mark which data points were valid and which were errors. That would be your training set, and the AI would learn how to recognize invalid data points for an unknown boat. Then, what was left use a normal smoothing algorithm, or import into the polar plugin in OpenCPN.
__________________
-Warren
wholybee is online now  
Old 18-01-2023, 11:07   #9
Registered User

Join Date: Mar 2014
Location: Maryland USA
Boat: Beneteau Oceanis 37
Posts: 83
Re: Having Fun with AI

Quote:
Originally Posted by wholybee View Post
I have considered similar. I have been reading up on using Tensorflow for building a custom AI with Python. ChatGPT knows Tensorflow, which is wild because ChatGPT was probably written with it.



Anyway, I'm not sure AI or ML is a good approach. What you need is a smoothing algorithm to smooth out the curves, which is more suited for something like excel. Maybe AI would be good at filtering and discarding noise in the data. But you would need a lot of data. Like all the data you have for your boat, but for 20 boats. For each boat, you (a human) would mark which data points were valid and which were errors. That would be your training set, and the AI would learn how to recognize invalid data points for an unknown boat. Then, what was left use a normal smoothing algorithm, or import into the polar plugin in OpenCPN.


Python and Tensorflow are what I’ve been using so far. It’s really remarkable how just a few lines of python code build and train a decent model. Here’s an example of a polar generated by the predictions-
Click image for larger version

Name:	IMG_0385.jpg
Views:	53
Size:	84.7 KB
ID:	270224
Clearly it’s not perfect, but for the limited amount of time and tuning I’ve put into it so far it’s cool to see it get pretty accurate polar properties.

That’s an interesting suggestion to use ML to classify data points as valid or invalid. I’ll have to think about that more. I’ve tried some Excel regression and it’s pretty good for two variables but it’s hard to scale it to all the features ML can consider to really pin down exact targets for the specific conditions.
Davidasailor is offline  
Old 18-01-2023, 12:05   #10
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

Quote:
Originally Posted by Davidasailor View Post
Python and Tensorflow are what I’ve been using so far. It’s really remarkable how just a few lines of python code build and train a decent model. Here’s an example of a polar generated by the predictions-
Attachment 270224
Clearly it’s not perfect, but for the limited amount of time and tuning I’ve put into it so far it’s cool to see it get pretty accurate polar properties.

That’s an interesting suggestion to use ML to classify data points as valid or invalid. I’ll have to think about that more. I’ve tried some Excel regression and it’s pretty good for two variables but it’s hard to scale it to all the features ML can consider to really pin down exact targets for the specific conditions.
I have been going through this book:
Deep Learning with Python Second Edition

It is very good. The early examples are a classifier as about the simplest AI you can build. After classification, you can draw a plot that divides the two classes. So maybe a 2 stage system where first you classify valid and invalid data, then after discarding invalid data, classify inside and outside the polar, then plot the dividing line.

I would also preprocess the data to move all the points greater than 180 to less than 180 and only plot half the diagram. Then mirror it. Unless you know your boat has a great asymmetry from port/starboard.
__________________
-Warren
wholybee is online now  
Old 18-01-2023, 12:27   #11
Registered User

Join Date: Mar 2014
Location: Maryland USA
Boat: Beneteau Oceanis 37
Posts: 83
Re: Having Fun with AI

Quote:
Originally Posted by wholybee View Post
I have been going through this book:

Deep Learning with Python Second Edition



It is very good. The early examples are a classifier as about the simplest AI you can build. After classification, you can draw a plot that divides the two classes. So maybe a 2 stage system where first you classify valid and invalid data, then after discarding invalid data, classify inside and outside the polar, then plot the dividing line.



I would also preprocess the data to move all the points greater than 180 to less than 180 and only plot half the diagram. Then mirror it. Unless you know your boat has a great asymmetry from port/starboard.


I’ll definitely need to play with some valid/invalid classification. I’m already discarding readings where the standard deviation of my heading is too high, figuring those are times right after a tack. But some further narrowing down would be good.

I did run another set or polars on just one tack, using the average boat speeds from both tacks for training. The results were smoother. For example
Click image for larger version

Name:	IMG_0386.jpg
Views:	42
Size:	61.3 KB
ID:	270229. I have definitely observed different speed close hauled on opposite tacks, so I’d rather get it working all the way around if possible.
Davidasailor is offline  
Old 18-01-2023, 12:37   #12
Registered User

Join Date: Mar 2016
Location: San Francisco
Boat: Morgan 382
Posts: 3,215
Re: Having Fun with AI

That looks very good!

I was just thinking. Another approach. Take basic boat data, LWL, SA/D, Displacement, SA, Draft, etc. for boats we have the polars for. (anything included in OpenCPN)

Then train it so we can enter boat data and get polars. That would be very useful for people that don't have recorded sailing data to draw from.
__________________
-Warren
wholybee is online now  
Old 18-01-2023, 12:59   #13
Registered User

Join Date: Mar 2014
Location: Maryland USA
Boat: Beneteau Oceanis 37
Posts: 83
Re: Having Fun with AI

Quote:
Originally Posted by wholybee View Post
That looks very good!

I was just thinking. Another approach. Take basic boat data, LWL, SA/D, Displacement, SA, Draft, etc. for boats we have the polars for. (anything included in OpenCPN)

Then train it so we can enter boat data and get polars. That would be very useful for people that don't have recorded sailing data to draw from.


That would be interesting!
Davidasailor is offline  
Old 18-01-2023, 14:42   #14
always in motion is the future
 
s/v Jedi's Avatar

Cruisers Forum Supporter

Join Date: Feb 2009
Location: in paradise
Boat: Sundeer 64
Posts: 19,352
Re: Having Fun with AI

Many posts on the forum are from AI; the good ones live a long time before a mod finally kicks them off.
__________________
“It’s a trap!” - Admiral Ackbar.

s/v Jedi is online now  
Closed Thread

Tags
fun


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passion Rebelle is having fun in the Caribbean with 4 kids on board ;) sunodyssey Families, Kids and Pets Afloat 3 11-08-2016 04:25
Crew Wanted: Seeking fun, fit, outgoing crew to share in the fun in the Bahamas Globetrotter12 Crew Archives 7 16-10-2014 12:02
having fun sifting thru all the mixed info about spraying gelcoat albergsailor Monohull Sailboats 0 16-10-2013 12:12
Norwegian Soldiers in Kosovo - having some fun rsn48 Flotsam & Sailing Miscellany 6 07-08-2006 16:31

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 15:24.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.