Join us on Discord!
You can help CodeWalrus stay online by donating here.

Virtual friend

Started by Ephraim Becker, November 11, 2015, 02:03:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ephraim Becker

I'm working on programming a Virtual friend in HTML, CSS, and JavaScript. The purpose is to help me with my conversations. You can download and see my progress on my Virtual friend at https://github.com/EphraimB/Virtual-Friend
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

p4nix

#1
Chat programs are quite cool. But the approach you use for questions and answers is a little bit too hardcoded (no insult, you are a way better programmer than me, if I look at your github). I think it's very hard to write a good chatbot, but this gives ok results with a very minimalistic approach (you probably know ELIZA already though):
https://en.wikipedia.org/wiki/ELIZA

EDIT:
I see that you want to also force yourself (or whoever is talking to your virtual friend) to let conversations run - that might be hard to achive on an ELIZA like setup...
  • Calculators owned: fx9860GII (SH4)

Ephraim Becker

I'm doing this from scratch.
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

p4nix

Sure, I've seen that. But if I'm not wrong you hardcode questions and answers at the moment. I mean you know what to ask your bot to get the conversation running, but I only got 'Huh?'.
  • Calculators owned: fx9860GII (SH4)

Ephraim Becker

Quote from: p4nix on November 11, 2015, 02:24:45 PM
Sure, I've seen that. But if I'm not wrong you hardcode questions and answers at the moment. I mean you know what to ask your bot to get the conversation running, but I only got 'Huh?'.

By that part you have to type the following exactly:
"What are your interests?"
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

p4nix

That's my point. Of course I've looked at your javascript - but a conversation isn't an algorithm. At least not a simple one.
  • Calculators owned: fx9860GII (SH4)

novenary

He wasn't suggesting that you use a library or anything, but that you take a look at other people's algorithms since chatbots have been made before and it's a good idea to take inspiration from existing things.
Programming isn't only about the language and libraries you use but also about design: algorithms and data structures are two things that you need to master and the best way to learn is to look at what others have done and see if you can come up with a better implementation or even an improved algorithm.

There is a lot of theory behind analyzing a sentence written by a human to extract its meaning and then compose a new sentence in reply. Go read up, you won't regret it. :)

Ephraim Becker

The main point of programming this is to learn how to converse with people better. I, for some reason, think in code better than English. So programming this from scratch would help me better with my conversations.
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

p4nix

#8
I totally got your point - and please note that I try to help you.
A conversation isn't linear at all - it's complex, twisted and... complex. And if you want to learn how to talk, you'll have to get a realistic conversation. I don't know if you know the turing-test (am I human, am I machine?), but that's what a chatbot has to try to achieve. I am not talking about ELIZA, I am talking about the method ELIZA uses to achieve that - it's a quite simple approach and it's based on the fact that a doctor can drive a realistic looking conversation by asking questions related to the topic you are talking about repeatedly.
However, even that approach is far away from being realistic, but it's way better than what you are trying to do now (no insult, but it will not work).

Anyway, the best way to learn talking is to start conversations in real life - even with people you don't know.

EDIT:
Even if you like your approach and even if you want to keep it - please take a look at this: https://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=5369&lngWId=3
  • Calculators owned: fx9860GII (SH4)

Ephraim Becker

After a day of hard work, Virtual friend 0.2.0 is released on GitHub. You can download it at the following link:
https://github.com/EphraimB/Virtual-Friend/releases/tag/0.2.0

This second beta release is based on the time of day
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

p4nix

Somehow I am stuck on the question 'Good evening! What's your name?' now :(
  • Calculators owned: fx9860GII (SH4)

Ephraim Becker

#11
Ooops! My bad. I'm going to have to fix that problem. I will release 0.2.1 shortly.

Update: I just released 0.2.1 but I had to sacrifice the greeting based on the time of day feature. You can download 0.2.1 at the following link:
https://github.com/EphraimB/Virtual-Friend/releases/tag/0.2.1
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

Dream of Omnimaga

Keep in mind that it's going to be impossible to get an AI that interacts 100% like humans. The feelings won't be emulated, for example (eg being angry, happy, etc), because so many things can alter them, and there will always be akward stuff happening when interacting with a bot. Also, in order to create a virtual friend that can help you socialize, it would need to be written by someone who has very good socializing skills in order to allow you to improve much. I personally wouldn't rely on a bot to improve my communication skills (*cough*especially not Nikkybot :P*cough*)


It can be a good learning experience, though, to make such bot, and AI bots tend to be quite popular sometimes.
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

alexgt

Great idea Ephriam!!! but I think that all the other people are right also :).

I think Nikkybot would give anybody a distinct distaste for communication IRL if you went solely off of that interaction :P
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Ephraim Becker

I just released virtual friends 0.2.3 which brings the feature I had to sacrifice in 0.2.1 finally back!

You can download it here:
https://github.com/EphraimB/Virtual-Friend/releases/tag/0.2.3
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

Powered by EzPortal