<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"><head><!--[if gte mso 9]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--></head><body><div class="yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div dir="ltr" data-setdir="false">DPRG folks - at last night's RBNV Carl shared an interaction with the paid version of ChatGPT, in which he asked it to design a behavior-tree implementation of driving a robot along a path, attending to obstacles, environmental sensors, etc. Then he asked it to design a subsumption implementation that did the same thing. It was a very interesting conversation (both at RBNV and in the chatGPT record). The chat record is here:</div><div dir="ltr" data-setdir="false"><a href="https://chat.openai.com/share/994e01a0-b757-4a33-b92c-12d145dde8ac" rel="nofollow" target="_blank" class="enhancr_card_5680753007">ChatGPT</a><br></div><div><br></div><div id="ydp1960c0b0enhancr_card_5680753007" class="ydp1960c0b0yahoo-link-enhancr-card ydp1960c0b0ymail-preserve-class ydp1960c0b0ymail-preserve-style" style="max-width:400px;font-family:"YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif" data-url="https://chat.openai.com/share/994e01a0-b757-4a33-b92c-12d145dde8ac" data-type="YENHANCER" data-size="MEDIUM" contenteditable="false"><a href="https://chat.openai.com/share/994e01a0-b757-4a33-b92c-12d145dde8ac" style="text-decoration:none !important;color:#000 !important" class="ydp1960c0b0yahoo-enhancr-cardlink" rel="nofollow" target="_blank"><table border="0" class="ydp1960c0b0card-wrapper ydp1960c0b0yahoo-ignore-table" cellpadding="0" cellspacing="0" style="max-width:400px"><tbody><tr><td width="400"><table border="0" class="ydp1960c0b0card ydp1960c0b0yahoo-ignore-table" cellpadding="0" cellspacing="0" width="100%" style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224, 228, 233);border-radius:2px"><tbody><tr><td class="ydp1960c0b0card-primary-image-cell" background="https://s.yimg.com/lo/api/res/1.2/l4B.rb1SjWleHvORsLEebw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://cdn.oaistatic.com/_next/static/media/chatgpt-share-og.49cbbffe.png.cf.jpg" bgcolor="#000000" valign="top" height="175" style="background-color: rgb(0, 0, 0); background-repeat: no-repeat; background-size: cover; position: relative; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:0;left:0;"><v:fill type="frame" color="#000000" src="https://s.yimg.com/lo/api/res/1.2/l4B.rb1SjWleHvORsLEebw--~A/Zmk9ZmlsbDt3PTQwMDtoPTIwMDthcHBpZD1pZXh0cmFjdA--/https://cdn.oaistatic.com/_next/static/media/chatgpt-share-og.49cbbffe.png.cf.jpg"/></v:rect><![endif]--><table border="0" class="ydp1960c0b0card-overlay-container-table ydp1960c0b0yahoo-ignore-table" cellpadding="0" cellspacing="0" style="width:100%"><tbody><tr><td class="ydp1960c0b0card-overlay-cell" background="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png" bgcolor="transparent" valign="top" style="background-color: transparent; border-radius: 2px 2px 0px 0px; min-height: 175px;"><!--[if gte mso 9]><v:rect fill="true" stroke="false" style="width:396px;height:175px;position:absolute;top:-18px;left:0;"><v:fill type="pattern" color="#000000" src="https://s.yimg.com/cv/ae/nq/storm/assets/enhancrV21/1/enhancr_gradient-400x175.png"/><v:textbox inset="0,0,20px,0"><![endif]--><table border="0" class="ydp1960c0b0yahoo-ignore-table" height="175" style="width: 100%; min-height: 175px;"><tbody><tr><td class="ydp1960c0b0card-richInfo2" style="text-align:left;padding:15px 0 0 15px;vertical-align:top"></td><td class="ydp1960c0b0card-actions" style="text-align:right;padding:15px 15px 0 0;vertical-align:top"><div class="ydp1960c0b0card-share-container"></div></td></tr></tbody></table><!--[if gte mso 9]></v:textbox></v:rect><![endif]--></td></tr></tbody></table></td></tr><tr><td><table border="0" align="center" class="ydp1960c0b0card-info ydp1960c0b0yahoo-ignore-table" cellpadding="0" cellspacing="0" style="background:#fff;position:relative;z-index:2;width:100%;max-width:400px;border-radius:0 0 2px 2px;border-top:1px solid rgb(224, 228, 233)"><tbody><tr><td style="background-color:#ffffff;padding:16px 0 16px 12px;vertical-align:top;border-radius:0 0 0 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:"YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif;border-radius:0 0 2px 0"><h2 class="ydp1960c0b0card-title" style="font-size: 14px; line-height: 19px; margin: 0px 0px 6px; font-family: "YahooSans VF", YahooSans, "Helvetica Neue", "Segoe UI", Helvetica, Arial, sans-serif; color: rgb(29, 34, 40); max-width: 314px;">ChatGPT</h2><p class="ydp1960c0b0card-description" style="font-size: 12px; line-height: 16px; margin: 0px; color: rgb(151, 158, 168);">A conversational AI system that listens, learns, and challenges</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div dir="ltr" data-setdir="false">I must say I am very impressed by how well it speaks, and how convincingly. I am less impressed by the code it generated. T<span style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">here would be a need to understand what the code it provided does, how the algorithm it used works, and to fix it appropriately. </span></div><div dir="ltr" data-setdir="false"><div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">Specifically, the first code sample - behavior tree - shows the task functions always returning true after running BIT logic or Sensor checking logic. In fact, the behavior would need to return true or false depending on whether it needed to consume that iteration, because Selector.run() runs its children until one returns true, then returns true to its caller, so if all the tasks return true always, it will only ever execute the first task.</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">IOW there's a need to understand how the behavior tree algorithm should work in order to correctly write the task functions to return the correct value, true or false. E.g. if it's not yet time for the EnvironmentSensor to take another reading, or the next reading is not ready, it should return false so that the next lower priority behavior in the Selector can run.</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">Also, the subsumption code looks backward to me. ComplexBehavior (layer 2) is shown as path following which should be lower priority than layer 1 (obstacle avoidance), but ComplexBehavior.execute() is called first in loop() and it gets first shot at whether it wants to run in "if (/*condition to take control */), and if it doesn't want to run it calls lowerlayer - the obstacle avoidance. Path following is always going to want to run, but it should be subsumed by the avoidance behavior, but in fact the opposite happens in chatGPT's implementation. </div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;" dir="ltr" data-setdir="false">Overall, this looks like template code from a homework exercise for some robotics course. I'm reminded of the author who's suing OpenAI because ChatGPT knows all about the characters in his book, and will recite the story in detail on demand. I'm unconvinced it knows anything and it looks to me like it would lead you astray.</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;" dir="ltr" data-setdir="false">I only analyzed the first two implementations before concluding it was junk.</div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;"><br></div><div style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; font-size: small;">Unimpressed in Little Elm :-0</div></div><br></div><div><br></div><div dir="ltr" data-setdir="false"><br></div></div></body></html>