Search Unity

How to make simple AI?

Discussion in 'General Discussion' started by leegod, Mar 16, 2017.

  1. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Something like ChatBot or other simple AI?
    Do I need enormous background server systems?
    AlphaGo likely machine learning AI is impossible to make for small team?
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    A chat bot is not a simple ai.

    A simple ai is in-game melee opponent that can pursue, flee, attack, defend. 50 lines of code or less.

    A chatbot is more complex than that.

    In case of a chatbot a good idea would be to use an existing framework, for examle chatterbot: https://github.com/gunthercox/ChatterBot looks like a decent start.

    Basically, search through the web for projects with compatible license (BSD, LGPL, comercial proprietary) and plug them into unity.
     
    Ryiah likes this.
  3. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
  4. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    I want more practical chatbot that can help in specific area like medicine, law,,,
     
  5. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Having read some of your past threads I'm starting to conclude that you never research a subject prior to asking about it.

    Proper chatbots, like the one on the asset store, use an AIML database for their responses. If you want a chatbot that responds a certain way to certain inquiries you don't write a new chatbot. You write a new AIML database.

    http://www.alicebot.org/TR/2005/WD-aiml/
    https://www.tutorialspoint.com/aiml/
     
    Martin_H and Ostwind like this.
  6. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,138
    To be fair, which I rarely am, it's possible they suffer the same problem I have where they research something and it points them in entirely the wrong direction. I've had that happen to me a few times when writing extensions for Unity to make it behave like how I want it to.
     
    angrypenguin, theANMATOR2b and Ryiah like this.
  7. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Quite possible but that never stops me from at least looking at the Wikipedia entry. Everything I mentioned is covered there.

    https://en.wikipedia.org/wiki/Chatbot
     
    Martin_H likes this.
  8. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    Erm.... I think you might want to look into Microsoft chatbot framework, and see if IBM watson sells their services. It looks like their "Dialog" service is retired, though.

    "Practical chatbot" is a very tall order, and when there's a knowledge database tied to it, you'll suddenly end up needing an IBM Watson level software.
     
    angrypenguin likes this.
  9. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    So the subject like [Law] is too wide to make by small team?
    Then subject should be more specific like [Marriage Law] or [Buying & Selling Law] ?
     
  10. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Thanks for good infos.
     
  11. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,566
    Yes, I think the topic is way too big for a small team. I wouldn't touch this kind of project.

    You'd need a team of lawyers, and you'd need to develop it for several years. Basically, where I live, there are two competing companies total that produce electronic systems that reference local laws. Both companies are twenty years old. They don't use chatbots.

    I'd say it is on "let's write our own OS from scratch" level.

    The way I see it, you could only cram some sort of FAQ on the subject into chatbot, but if you're looking for an Oracle AI or an "AI Lawyer" kind of product, it ain't gonna fly unless you use something like Watson - and even in this case there will be issues.

    Please note that this is merely my opinion.
     
  12. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,804
    Heh, wants to make a simple AI... even if the bots would be replaced by 24/7 humans those areas can be very complex and can require time consuming consulting or research even if the person is as expert in the area. Guessing and loose answer are pretty much worthless to the person asking.

    You will probably have better luck by making a cook or waifu bot.
     
    Ryiah likes this.
  13. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    A chatbot for legal advice may be one of the worst ideas I've heard in recent memory.

    No, wait. A legal-advice chatbot written in Unity is actually the worst idea.
     
  14. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,138
    No, I think the worst idea ever would be all those things but also having it represent you in court.
     
  15. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,619
    What do you mean? It's a great idea. Imagine how much cheaper and more accessible legal advice could be if you didn't have to pay a human hundreds of dollars an hour for it?

    The issue isn't with the concept, it's with the practicality of implementation with current technology.
     
  16. Mordus

    Mordus

    Joined:
    Jun 18, 2015
    Posts:
    174
    Teleporting to work every day with my home teleporter pad would also be a great idea, imagine the reduction in traffic, fuel consumption, environmental emissions etc. It's not a problem with the concept, I just need to figure out the practicality of implementation with current technology.

    "Is it even possible" is a part of the merit of an idea.
     
  17. leegod

    leegod

    Joined:
    May 5, 2010
    Posts:
    2,476
    Maybe legal chatbot can't so perfect like human. But if lowering expectation, it can be useful as well at that low level.
     
  18. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,144
    Only for very basic inquiries (frequently asked questions that have well known answers) which could be just as easily handled through websites like StackExchange. Anything more complex or specific would be too risky in my opinion to have it answered by anyone not a human.

    http://law.stackexchange.com/

    Or a search engine specifically made for researching legal matters which promises validated sources.

    https://www.lexisweb.com/
     
    Last edited: Mar 17, 2017
    passerbycmc likes this.
  19. cdarklock

    cdarklock

    Joined:
    Jan 3, 2016
    Posts:
    455
    More importantly, legal, medical, and financial advice is regulated by law in most countries.

    Ironically, what you need on this is professional legal advice.
     
    chelnok, carking1996, MV10 and 4 others like this.
  20. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    You will probably want to spend some time exploring NLP Natural Language Processing. I've been working on a server API and database using Stanford's NLP for some years now. Here is a PHP hasher I wrote which can be the first steps for creating a database of "like" phrases and terms.
    http://charleshays.com/php-class-wrapper-for-stanford-part-of-speech-tagger/

    You can build a database of quick hash references something like this.

    [sentence] => The cow jumped over the moon and the dish ran away with the spoon .
    [tag_set] => {DT-1} {NN-1} {VBD-1} {IN-1} {DT-2} {NN-2} {CC-1} {DT-3} {NN-3} {VBD-2} {RB-1} {IN-2} {DT-4} {NN-4} {.-1}
    [mask_set] => The {NN-1} {VBD-1} over the {NN-2} and the {NN-3} {VBD-2} {RB-1} with the {NN-4} {.-1}
    [hash_sentence] => c2e9c7366d2f86736fa292b1425e9cf8
    [hash_tag_set] => 8bcfb4f7c0bc8de88bcc7252ace64267
    [hash_mask_set] => da050153d01b3e8045c9c7afe12d7945
     
  21. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    I've had a go with the Stanford parser. Its OK but not amazing. I think it has trouble with things like brackets and quotes.

    BTW does anyone know any free modern dictionaries with definitions that are free to download? This seems to be a bottleneck in AI research because there is not enough free data! Because of capitalism and copyright law.

    (Also I don't mean WordNet, just a free ordinary text dictionary)
     
  22. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,138
    Have you tried Wordnet? Last I checked all you had to do to use it was cite your source.
     
  23. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    Goof luck using word net. I abandoned that mess years ago. It is probably pretty good but the database is a convoluted headache. I would love to talk to anyone who has entangled it for sql. But word net isn't really a tagger, it's a word root identifier. Which has its own benefits for chat ai depending on what one is doing.

    I've not seeen a perfect tagger, but I also sanitize anything I feed into one. Stanford can be pretty good depending on lexicon and matrix you use. Usually 99.7 accuracy with the right setup. There are simpler ones that are fast but they are usually around 91%.
     
  24. yoonitee

    yoonitee

    Joined:
    Jun 27, 2013
    Posts:
    2,363
    The thing is if there was a simple free dictionary with definitions such as:

    cat (noun): An animal with claws and fur.

    Then you could look up the definition for "animal" "claws" and "fur" and so on. You would end up with some loops. e.g.

    animal (noun): For example, a cat

    But once you've defined a few things like "animal" "machine" "plant" and so on. You could get a lot of information just from parsing a dictionary. But unfortunately things like the Oxford English dictionary are copyright and you can't download them in text form.

    Sorry that's a bit off topic. For a chatbot, its worth looking at the data files for Cortana. You can define quite complex conversations apparently.
     
  25. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    Right but there iis no understanding of what a cat or animal is except the word are linked. One would have to define all kinds of manorisms and nuances, to make a word, especially a noun mean anything. And people have done that. None of it is really ai Imo, not unless actual machine learning is applied. But the world and the things in it and what they do has to be experienced and patterns created in some kind of cognitive capacity just like we learn. Check out ray Kurzwels book How To Build a Brain. He created machine learning and leads Google's AI department. I know some think he's past his prime and eccentric but I know of no better visionary on the topic.

    But like you said were off topic. Chat bots don't have to be real ai, very few are. What you want is a language parser.
     
  26. MV10

    MV10

    Joined:
    Nov 6, 2015
    Posts:
    1,889
    That's interesting, I wouldn't have expected that -- although Cortana did come out of MS Research's in-house ML effort and MS even bought Revolution Analytics (parts of the ML behind Cortana were modeled in Revolution R, a very popular ML language these days). Cortana, Siri, and a few other big voice recognition efforts (Mycroft is a popular "neutral" option) are now completely open source. I've never had time to really look at them but I've often wondered how their processing -- what I'd call "simple-voice-command recognition" -- might carry over into recognition of the written word. My expectation was that command-oriented voice-recognition wouldn't be too useful for chat-style interactions.

    Kurzweil definitely did not "create machine learning" and all he's leading at Google is their NLP effort. Not a trivial task, of course, but Ray's greatest talent is hyping Ray's talent. (In case it isn't obvious, I'm not a fan.)
     
  27. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    You're right he didn't, he did develop many things including early versions of voice recognition using machine learning. You're also right about his position at Google being for natural language processing, some of the articles I had read clearly didn't understand the difference between the two. Love or hate him, his books are still very insightful on the complexity and problems involved with true ai.
     
  28. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    This could put a stop to global warming (if you believe that crap and that humans are causing the rest of the planets to heat up as well). With no need for lawyers we can throw them all in the Mariannas Trench and remove the source of great amounts of heated air as well as sequester their carbon in all kinds of crabs and lobsters and various scavenger fish:).
     
    Ryiah and MV10 like this.
  29. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    Yeah. I agree. The last thing i want to do is integrate with a machine and have the blue screen of death. I do not want to be plugged into a machine to learn. That takes the fun out of it. This clown wants to borgify humans. I got a cowboy boot to plant in his lower fundament at about 70mph.
     
  30. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    He says it will happen eventually and we won't even realize it. Resistance is futile.
     
  31. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,853
    First off it would need a pleasure button. That right there would go on the black market..if outlawed..for a good buck. Second it needs a laugh circuit. There are too many variables involved with humor, wit and sarcasm. A proper laugh pattern would immediately break the singularity. Without laughter and pleasure who wants to go to a dreary machine world. Sounds like crap Satan would dream up in the lavoratory. The breaking of the singularity is perhaps why The Fool is the key card in the deck, where the equilibrium of the hard vacuum zero is broken by a joker walking over a cliff and looking at the sky...laughing.
     
  32. erumi186

    erumi186

    Joined:
    Jul 9, 2017
    Posts:
    1
    Hi, I am new here.
    I would like to join this thread; I've been working with AIML+C# for my own chatbot, but now I will move to api.ai+Unity. What do you think about it? Even if api.ai is not that friendly as they want you to think, I will give it a try.
     
  33. mysticfall

    mysticfall

    Joined:
    Aug 9, 2016
    Posts:
    649
    Probably someone should build a chatbot (or should we say 'postbot' maybe?) that replies to these kinds of threads with search results from Asset Store, Google, and Wikipedia. I'm sure it'll be a good start. :p
     
    Ryiah likes this.
  34. Deleted User

    Deleted User

    Guest

    This made me snort---so funny lmao