Search Unity

  1. We've closed the job boards. If you're looking for work, or looking to hire check out Unity Connect. You can see more information here.
    Dismiss Notice
  2. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  3. Unity 2017.2 is now released.
    Dismiss Notice
  4. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  5. We want to see what you will create. Take the Neon Challenge.
    Dismiss Notice
  6. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  8. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Unity Chatbot Asset - Approach To Simulate Human Being

Discussion in 'Assets and Asset Store' started by SkandYxyz, Jan 30, 2017.

  1. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    logo.png

    Asset to parse AIML 1.0.1 files in Unity. Webplayer basic example can be
    found here. This is used to make a chatbot. You can write your own AIML
    "brain" and let your characters speak and interact with your scripts.

    This is possible due to Jurassic, a fully integrated javascript runtime compiler.
    You can write your javascript into the AIML files and preprocess your AIML
    code through the javascript function main(){return"";} before the bot answers.
    Exception handling in Unity console, pass and get global variables, do regular
    java script commands while processing AIML files. Now Chatbot framework
    is introduced, bridging the gap between Program #, Jurassic and
    implementation in your game. Advanced Example added and will be improved
    continous in next updates, as there are thousends of categorys to rewrite.
    The possibilitys are infinite.

    Current supported platforms: PC, Mac & Linux standalone, Webplayer,
    WebGL for Unity 5.2.0f3 upwards, Android and IOS. Now full support for basic
    and advanced example on all named plattforms. More example scenes will be
    added in next updates.

    Supports Unity 4.0.0 - 5.x

    Visit www.chatbotunityasset.com for more information and download Chatbot
    on the Unity Asset Store.

    Visit the roadmap for further development.
     
    Last edited: Jan 30, 2017
  2. Devision4

    Devision4

    Joined:
    Jan 12, 2013
    Posts:
    1,071
    We are working on a alternate Reality Game like "Majestic12" and need a sophisticated bot that minicks a human on the other side of skype. would it be possible with API to connect the bot somehow to skype to make it more realistic?
     
  3. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    @Devision4:
    Hey!

    Yes, you can implement an interface like skype. To make the bot "intelligent" you can modify existing AIML 1.0.1 bots like integrated alice bot or use the more life like chatbot framework that is more interactive and simulates feelings and intentions etc. Here you'd need to modify the existing advanced example brain.
     
  4. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    815
    Looks great. Do you have a working webplayer? The link in your description isn't working. Thanks.
     
  5. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    Hey adamz,

    Yes, web gl and webplayer are working. I had to move the website to a different webspace and this might be the reason for the example not working. I will check it this evening.

    Best,
    Andre
     
  6. DADA_universe

    DADA_universe

    Joined:
    Mar 14, 2015
    Posts:
    2
    Hi,

    This looks real neat, a few curious questions please:

    What's the Jurassic compiler used for, why do you need Javascript in this?

    Is it possible to use AIML 2.0 with this?

    Your road map estimates you'll have a sample scene with a 3d avatar ready by July, if one tried out to implement something along that line in the interim, what would you advise?

    Any considerations for implementing text to speech with this, perhaps with inbuilt Windows.Speech integration in Unity?

    Does this work fully offline without http requests to some server? Asking because I'm considering this for a VR project where latency from http requests would be an issue.

    Thanks.
     
  7. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    84
    HI,

    I have made my own basic .aiml file. How do I add it to the basic example? What .aimls does it load and where does it load them?
    eg I made this

    <category>
    <pattern>WHY SHOULD I JOIN A SYNDICATE*</pattern>
    <template>Have more fun playing. Increase your chances of winning. All costs and winnings are shared. Play together in a team</template>
    </category>
    Can I paste this into a aiml file somewhere and have the bot respond with the template code ?
     
    Last edited: Apr 5, 2017
  8. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    @DADA_universe:

    The Jurassic compiler adds more functionality to aiml and is even intended by aiml language with the javascript section. You can access the input text and perform string operations and change/read variables what you could never do this complex with aiml. Aiml itself only offers simple if else/switch syntax.
    AIML 2.0 will not work with chatbot. The reason, why I won't integrate AIML 2.0 is, that it is not designed for usage in games. I want to start from AIML 1.0.1 and develope it more for gaming usage to work as npc.
    To use chatbot with an avatar, I would use rigged 3d models with blendshapes and write a mono behaviour to interact with it. MCS Male for example has a free male/female version that includes facial blendshapes.
    You can use open source text to speech modules. But I guess in a final game you would record the sentences and play them as output. It works offline, but you could also store and access the files on a server. But offline is much faster, as WWW class is quite slow.

    @McSwan:

    You need to include it into the aiml folder, where the other aiml files are located. Then you need to open the config/Settings file and add your aiml file there.The files named in the Settings file are loaded. They get loaded, by this code:
    Code (CSharp):
    1. bot.loadSettings(Application.dataPath + "/Chatbot/Program #/config/Settings.xml");
    2. // Load AIML files from AIML path defined in Settings.xml
    3. bot.loadAIMLFromFiles();
    You can find those lines in the AIMLTestChat.cs file.
    Yes you can create new templates or even create your own new aiml folder with your aiml files.
     
  9. McSwan

    McSwan

    Joined:
    Nov 21, 2013
    Posts:
    84
    Hi,

    Thanks for your help. I made a very specific aiml file and it worked. I think the other aiml file I had didn't work because the pattern might have been picked up elsewhere.
     
  10. alsharefeeee

    alsharefeeee

    Joined:
    Jul 6, 2013
    Posts:
    26
    Hi @SkandYxyz

    Question please, is it possible to add new responses while that game is playing?
    or saving certain variables while chatting with Alice?

    Thanks.
     
  11. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    Hi @alsharefeeee,

    yes, this is possible. There are several ways to achive this. In general all you need to do is add a category to the bot and store the changes in an custom aiml file.

    Yes you can receive variables from chatbot and store them in a file, e.g. .asset file.

    Best,
    Andre
     
  12. Dragon972

    Dragon972

    Joined:
    Apr 16, 2015
    Posts:
    1
    Hello

    I have a problem, every time i close my app on android , my bot lost all memory of names and more
    Do you know how to solve this problem? and the scene reset the bot memory all the time.
     
  13. Shturmovik

    Shturmovik

    Joined:
    Nov 5, 2014
    Posts:
    8
    Does this work with Unity 2017.1?
     
  14. Cyberschlumpf

    Cyberschlumpf

    Joined:
    May 2, 2016
    Posts:
    5
    Yes, Chatbot works with Unity 2017.1.1f1
     
  15. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    Hi Dragon972,

    Names and other informations are stored in an array/list and are not stored on hdd unless you save and restore them yourself. You could write a store and a reload function and save the information to an asset and reload them again into the variables. You could create an information class and store it as an asset in a resources folder.

    Best,
    Andre
     
  16. foundway

    foundway

    Joined:
    May 30, 2013
    Posts:
    12
    Hi, we are testing ChatBot in our new game. We noticed that the Basic Example takes a long time to load on Android build. Is it possible to reduce the loading time? (perhaps load fewer AIML libraries?)
     
  17. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    23
    Hi,

    What slows down is when aiml files are loaded via www class. As far as i remember i implemented a way to load aiml files from resources path what is much faster. How to do this is written in the documentation. Else you could of course reduce the aiml files to only the ones you need.

    Best,
    Andre
     
  18. mybreeze

    mybreeze

    Joined:
    Nov 12, 2016
    Posts:
    6
    is this support for unity 2017.2?