You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

Virtual friend

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

0
b/Web publicado por u/Ephraim Becker November 11, 2015, 02:03:56 PM
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
Inicia sesión o crea una cuenta para dejar un comentario
u/p4nix November 11, 2015, 02:12:03 PM
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...
Last Edit: November 11, 2015, 02:19:58 PM by p4nix
u/Ephraim Becker November 11, 2015, 02:23:02 PM
I'm doing this from scratch.
u/p4nix 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?'.
u/Ephraim Becker November 11, 2015, 02:30:54 PM
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?"
u/p4nix November 11, 2015, 02:32:13 PM
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.
u/novenary November 11, 2015, 02:33:23 PM
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. :)
u/Ephraim Becker November 11, 2015, 02:36:31 PM
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.
u/p4nix November 11, 2015, 02:46:34 PM
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
Last Edit: November 11, 2015, 06:08:42 PM by p4nix
u/Ephraim Becker November 11, 2015, 08:05:25 PM
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
u/p4nix November 11, 2015, 08:11:54 PM
Somehow I am stuck on the question 'Good evening! What's your name?' now :(
u/Ephraim Becker November 11, 2015, 08:15:57 PM
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
Last Edit: November 11, 2015, 09:10:50 PM by Ephraim Becker
u/Dream of Omnimaga November 11, 2015, 08:56:39 PM
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.
u/alexgt November 11, 2015, 11:04:24 PM
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
u/Ephraim Becker November 12, 2015, 01:09:42 AM
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
Start a Discussion

b/Web

Website developement and scripting

68
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal