Author Topic: Un-needed Code line in S.A.L.L.I.E 3.0???  (Read 3338 times)

LiFeTimeGamer

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • LifeTimeGamer
Un-needed Code line in S.A.L.L.I.E 3.0???
« on: May 04, 2018, 10:33:56 pm »
Was looking through the code and found this, look at line 31 in my attached image...

The spinner sequence should go from 1 to 5 but line 31 says; If Spinner = 23 then line 32 says: If Spinner = 2

Is that just a mistake Doony?...  :)










When it comes to Artificial Intelligence: The Soul is in the Software.

Ameliaz

  • Guest
Re: Un-needed Code line in S.A.L.L.I.E 3.0???
« Reply #1 on: May 21, 2018, 05:14:18 am »
How much can I access the content of these forums in order to be developed in the future?

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: Un-needed Code line in S.A.L.L.I.E 3.0???
« Reply #2 on: May 21, 2018, 08:40:04 am »
Ameliaz,

This is an open Public Forum for those interested in exploring A.I. (Artificial Intelligence) and other possibilities by way of the program, Ultra Hal 7, primarily a Chatbot.
Hal can be enhanced through 3rd party "Plugins" that allow Hal to do a variety of helpful tasks.

You are free to read through the Forum and its content as much as you want and as long as you want. No limits.

Enjoy!
In the world of AI it's the thought that counts!

- Art -

Art

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: Un-needed Code line in S.A.L.L.I.E 3.0???
« Reply #3 on: May 21, 2018, 08:56:02 am »
Was looking through the code and found this, look at line 31 in my attached image...

The spinner sequence should go from 1 to 5 but line 31 says; If Spinner = 23 then line 32 says: If Spinner = 2

Is that just a mistake Doony?...  :)
==========================

LifeTimeGamer / Doony/ et. al.,

There is another sequence in Hal that uses that EXACT code and makes much better sense from a code standpoint.
0 - 5 = 6 Choices, Zero has been a starting number for many years instead of our school teaching 1,2,3,4., in computers it's 0,1,2,3, etc.

Around line 168 (in my SALLIE3.0 plugin):
168 RESPOND: USER EXPRESSES AN EXPLANATION
Spinner = Int(Rnd * 1)
         If Spinner = 1 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 23 Then GetResponse = " " & " <UserName> " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 2 Then GetResponse = " " & IntroExclaim & " <UserName> " & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 3 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & " <UserName> " & SuffixComment & " "
         If Spinner = 4 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " <UserName> " & " "
         If Spinner = 5 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         DebugInfo = DebugInfo & "The user has expressed a explanation and Hal has responded: " & GetResponse & vbCrLf

There is also, which I believe to be the correct code line (approximate) 4895

Spinner = Int(Rnd * 6)
         If Spinner = 0 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 1 Then GetResponse = " " & " <UserName> " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 2 Then GetResponse = " " & IntroExclaim & " <UserName> " & Enlightener & ExplainPhrase & SuffixComment & " "
         If Spinner = 3 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & " <UserName> " & SuffixComment & " "
         If Spinner = 4 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " <UserName> " & " "
         If Spinner = 5 Then GetResponse = " " & IntroExclaim & Enlightener & ExplainPhrase & SuffixComment & " "
         DebugInfo = DebugInfo & "The user has expressed a explanation and Hal has responded: " & GetResponse & vbCrLf

==============================
I changed my code in those line numbers shown and everything works great.
It was probably just a late night snafu in the original code.

Hope this helps.
In the world of AI it's the thought that counts!

- Art -