Thread: Chat BOT

  1. #16
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    A program that will also say one thing, or maybe even a couple of things, when you input a certain string is a fruitless programming venture and should be avoided.
    That's absurd! So would you say that to develop a Windowed operating stystem "is a thing of the past" and so it would be worthless to write "yet another"? In my opinion, all sincere effort is worthwhile, since it helps improve one's skills. Sure, artificial intelligence is a great idea, but let's face it: computers do not think! There is a beauty in that, you know. The essence of the computer, in fact, is that it will only do what you tell it to do and how you tell it to do it! Be proud of that, dammit
    The experience I have with AI type behaviour, in fact, falls in this category. At work, we do a lot of "simulative AI" such as this, and the results are very satisfying, actually. The thing is, the human mind can be easily made to believe the patterns are random and natural, when in fact, they are viewing a subset of controlled behaviour.

    Anyway, thinking is a completely different topic. The main obstruction is memory consumption. Learning takes lot's of it, and it also takes a lot of CPU time to process the decision making. No doubt, though, it is an extremely interesting project. Any takers?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  2. #17
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Ok i thought about this alot today, and started an algorithm with ideas on how to go about this. Each step is listed in the order of which it is to occur.

    Marvin(its name i'll explain l8er):

    1) Robot Introduces itsself.
    2) As for users name.
    3) Store users name.
    4) Say hello useing persons name, and ask the first question.
    5) User gives answer.
    6) Scan wordlist.h for a match.
    7) If match is found goto corresponding id number in reply.h
    8) Output the reply.
    9) If not found, add word to word.h and set to be recognized in future instances.
    10) Ask new question or ask user to ask question.
    11) goto 6 - 10.

    The difficult part in my eyes is learning. Sure i can store the information, but to have marvin auto - incorporate it....hmm...

    Now i don't want a normal bot. Marvin needs to be able to learn in any situation, and i have never done AI before. My deadline is October 30th, is this POSSIBLE.

    And where is THE BEST AI devoted site?

  3. #18
    Code Monkey Davros's Avatar
    Join Date
    Jun 2002
    Posts
    812
    > blackwyvern : What I envision for chatbots is the next step in creating a true AI. You can create a nueral network that links words with common thoughts...

    That's a great idea! Wish I'd have thought of that one? [Sarcasm]

    More seriously, how would you propose we do that? How does one link a neural network with text & obtain meaningful ouput? Would it be any better than other forms of matching, such as keyword/synonym searches? I for one don't think a chatbot, who's only means of input is textual, could ever approach true AI.

    I think this discussion would be better served under 'General Discussions' rather than C++ Programming.
    Last edited by Davros; 10-10-2002 at 12:35 PM.

  4. #19
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    I think this discussion would be better served under 'General Discussions' rather than C++ Programming.
    maybe a new thread, but i'd like to keep this one on topic :P

  5. #20
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    6) Scan wordlist.h for a match.
    You mean wordlist.txt, right?

    Also, look at your logic, here:

    M: Hello, my name is Marvin, how are you?

    Y: Well, fine, I suppose...
    /*...marvin doesn't understand and so sends
    "Well, fine, I suppose..." to the text file

    M: I don't understand. Perhaps later...

    Y: Well, fine, I suppose...

    Now what happens? How can Marvin generate any response?

    More seriously, how would you propose we do that? How does one link a neural network with text & obtain meaningful ouput? Would it be any better than other forms of matching, such as keyword/synonym searches?
    That's an excellent point, Davros.

    Here is one way to implement the AI:

    -first, you'll need 4-20GB of memory for Marvin to work with.

    -start with a dictionary, thesaurus, and grammer (for conjugation of verbs and such) database. Marvin will need these to learn. The dictionary he uses must give hime the type of the word too (verb, noun, adjective, etc...).

    -set up something like Blackwyvern's IRC observation idea. Let marvin just sit there for several weeks, just digesting (potentially foul ) conversation. During this time, Marvin saves every sentence in a database, and meanwhile creates yet another database - a contextual one.

    -finally, release Marvin, the amazing chatbot onto the world, where, using what he learned from the IRC chatroom(!), he goes on to learn to converse with anyone, and in any situation. C3PO comes to mind
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  6. #21
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    Here is one way to implement the AI:

    -first, you'll need 4-20GB of memory for Marvin to work with.

    Why? He only needs to know a certain amount, i guess i won't give him the learn ability yet....

  7. #22
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    Originally posted by Ride -or- Die
    i guess i won't give him the learn ability yet....
    YET?! Boy, you wont be writing a program that can teach itself to communicate with the user on a friendly level for a long time! hehe

  8. #23
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    im working on something like this, its run from an XML script, and itll generate responses that are random that have to do with that convo

    http://users.cloud9.net/~khalid/liquidbot

  9. #24
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    See my prob, BMJ, is i set such high goals for myself when i get into something that i end up with a product i can't begin to achieve yet, and then get discouraged cause i feel i underachieved. I guess i'll just have the keyword detection with a defualt do not understand reply, but i hope too have marvin quite intelligent by June, so he can be part of my CS final.

    I want a game and a bot as my CS final, the bigger a finish i mka ethe btter it'll look on my record.

  10. #25
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    A need a little clarification on what this guy meant. We were talking bout ways to link the keywords to replies. I just need an idea how to actually incorporate it.

    x: Look, what you want is an enum. You don't want to hard-code numbers for tokens.

    LiquidCyanide17: ok, i've never worked with tokens

    x: May I see your code?

    LiquidCyanide17: i thought i'd just link nums to nums, if theres a tutorila i'll learn it, thats no prob

    LiquidCyanide17: not that far, jus finished the algo

    LiquidCyanide17: tutorial*

    x: Look, an enum just assigns a constant to each name in the list...what the constant actually is is usually unimportant



    LiquidCyanide17: ok i'm with ya so far
    LiquidCyanide17: lol

    x:
    enum Whatever
    {
    dookie, dingleberry, crap
    };

    This sets "dookie" to 0, "dingleberry" to 1, and "crap" to 2.

    LiquidCyanide17: o ok i get ya
    LiquidCyanide17: that makes sense

    x: you can assign these numbers to an int, or to a variable of type Whatever, but if you use the latter you can use ONLY the constants defined for it

    x: But don't use 0, 1, or 2, always use the names


    FurryKef: It makes the code a lot clearer
    Last edited by RoD; 10-10-2002 at 03:33 PM.

  11. #26
    Registered User blackwyvern's Avatar
    Join Date
    Jan 2002
    Posts
    60
    Heh, didn't think people would be so sarcastic about such a suggestion =)

    But you must admit that in the long run even starting on a project like I explained would be more interesting and rewarding than completing an idiotic bot that can do nothing but string searching. Now, I didn't give ways on how to implement such learning behaviours because frankly I simply do not know, otherwise I would have already created my program instead of quitting in frustation.

    Sorry for causing such an upstir on thought.

  12. #27
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    on topic, PLEASE.

  13. #28
    Registered User blackwyvern's Avatar
    Join Date
    Jan 2002
    Posts
    60
    Within the context of how this conversation ended, I was well within topic... How I hate chat nazis... You should just create a NAZI-bot for this place so if a poster isn't within 100% relevance of a certain category, they get chided or banned.... And you don't have to spend any time on the name, I will give you the rights to NAZI-bot.

  14. #29
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    First off your nazi comment is 100% inappropriate and should be removed.

    Secondly the argument taking place isn't on topic, on topic is discussing different ways for me to do what i am attampting, which you have not helped with. If you want a controversial thread, make your own.

  15. #30
    Registered User
    Join Date
    Apr 2002
    Posts
    23
    Hi,

    think the original one was 'ELIZA'. Sure the code is available out there somewhere on google. I once wrote a 'plugin' for it but it was in prolog so not much use,

    Good luck with this, sounds intresting

    Brif

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Chat Bot Help!!
    By arealfind08 in forum C Programming
    Replies: 1
    Last Post: 03-09-2009, 06:52 AM
  2. Chat bot brain ideas
    By cogeek in forum C++ Programming
    Replies: 14
    Last Post: 10-02-2004, 12:26 AM
  3. Chat Bot: Multiple headers problem
    By RoD in forum C++ Programming
    Replies: 4
    Last Post: 03-26-2003, 06:07 PM
  4. Chat BOT Sample
    By RoD in forum C++ Programming
    Replies: 19
    Last Post: 11-04-2002, 04:51 AM
  5. Msvc Aim Chat Bot ???
    By Unregistered in forum C++ Programming
    Replies: 0
    Last Post: 09-19-2001, 08:46 AM