AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Getting started on my chatbot for Unity3D
 
 

In reading through the forums to research this technology I’ve seen a lot of people show up, ask a bunch of questions, and then seemingly disappear. So here is an update.

I read through the documentation, did the tutorial in the download, and reviewed the documentation again since more made sense after that. Now I’m outlining my bot.

Because I like projects that are insane (my last crazy project to make a procedural map builder turned out okay…eventually ;D ) my first bot is going directly for my goal of a bot that is reconfigurable to represent a variety of different personalities. I think it will *only* be about 4 times as much work as a bot representing a single personality, so no problem!

I’m designing the bot by splitting up the character into 12 personality attributes (one per TOP file), each represented by a series of topics that describe the character’s feelings, beliefs, and reactions on particular area of life (war, relationships, personal appearance, food, education, cultural issues, etc.) with topics for various aspects of each area. Within each there are 4 variations, such as for war there are Pacifist, Defensive, Confident, and Aggressive and a variable at the beginning of each topic will define whether a topic within a particular variation is eligible to be chosen for a particular character. I think for the most part I’ll be able to mix and match different variations of each attribute pretty freely so minor characters in a game can have their personalities randomized. Some combinations may produce conversation that doesn’t make sense, like a character that is culturally Xenophobic but Pacifist on warfare. If it doesn’t work when I can test the bot I’ll have to define a more complex way of randomizing that only allows reasonable combinations.

Right now I’m going through and roughing things out by defining a few gambits for each topic, starting with about 5 in each for now. I’m pretty sure some of the ones I’m defining will end up being rejoinders though. Then I’ll fill in the topics with responders and such to get the bot up and running at a level I can show others

I must say, intellectually expecting that this is going to be a multi-year project was one thing. Actually seeing an outline of the next couple of years of my life’s “free” time set down in text is sobering. But if making one’s dreams a reality was easy, everyone would do it.

 

 
  [ # 1 ]

Nice, keep us posted!  Especially interested in how you blend different ‘sets’ into a believable ‘character’.  Personality should probably play into it as well, no?  i.e., maybe the Briggs Meyers 16 personality types?  Not to add another dimension to an already complex problem.  :D

 

 
  [ # 2 ]

One thing I plan to leverage is that in a game these aren’t going to really be chatbots, but characters in a world. If one was to walk up to some random person on the street and being probing to see how sophisticated their chat interface is and asking questions about what color their favorite dress is, I’m fairly certain one would be disappointed to find that the conversation would rapidly devolve into stock phrases like “get away from me you weirdo!” Personally, I’ll answer a few questions without resenting a stranger’s presence, but after that I begin trying to find a way out of the conversation as fast as possible.

Similarly a character in a game should have stuff to do, and so should the player. So I want to direct the conversation away from something that runs on and on and exposes all the flaws in the bot, but rather helps the player get the information they need, feel immersed in the game, and enjoy their experience, then moves them back into the action. There are likely to be bots within the game that the player should be able to have real conversations with. But those are going to be major characters, not a randomly generated farmer. The farmer is willing to help out a bit but ultimately they either want the player to let them get back to plowing their field, or maybe to agree to hunt the wolves that are killing their sheep before they get back to plowing their field or whatever, so that’s what the bot should do.

I had originally planned to dig through TV Tropes to use descriptions of character archetypes and model it on that. I had also planned on a more sophisticated system with different levels like id/ego/superego getting blended together and yielding probabilities of a character going in different directions. I still think it could be useful but way more sophisticated than what I’m able to do right now.

I was just going with what characteristics would make interesting characters. Then I realized most of these fit into the Dungeons and Dragons Law vs. Chaos and Good vs. Evil alignment system, with either the 4 variations for each trait being close to LG, CG, LE, and CE or close to LN, CN, NG, and NE. So I tweaked the ones that didn’t fit so that they would match one of these patterns, which I think will turn out to be useful down the road for integrating the characters into a larger social framework. Also it just makes it easier for me to portray the characteristics of each variation and will probably be useful for designers creating a tailored character using the system.

If more blending is needed, I hope I can just get away with a NOSTAY reactor topic for things that may need to be blended to suggest a connection. For example military and cultural attitudes would be expected to influence each other so blending between these traits might be needed. If the player is discussing cultural matters but a particular conversation rule would be appropriate to mention military attitudes in connection with it, the military reactor topic could be called to add some flavor of the character’s attitude toward war.

What I don’t want to do is actually create topics that are blends between different traits. An example here would be jingoism which would be a combination in my bot system of cultural Chauvinism and military Aggression. To fully blend the two there would need to be a NOSTAY topic that contains jingoistic gambits that could be called from particular rules for having a conversation about Chauvinism and Aggression.

However, I want to avoid having to use such blending if at all possible, so I’m trying to keep each trait as self-contained as possible. At present the amount of work compared to making a single bot is only proportional to the number of options for expressing each trait. Since I’m using only 4 options that means it is only 4 times as much work. Basically I’m making 4 bots and allowing the system to swap their parts around to create variety. If I have to make blendings, the number of blendings will be proportional to the square of the number of options in each trait times the number of traits that need to be blended together. That’s going to increase the amount of work a lot and probably result in failure for the project.

I will be creating hooks in some of the conversation rules to see if custom topics were created for the bot and branch into those topics. This will allow designers down the road to create limited extensions for bots that are important characters in the game without having to dig into the core functionality of the bot. That way if a designer wants to get into making a character an interesting jingoistic villain or whatever, they can do so.

 

 
  [ # 3 ]

Hey Jeff, tried to email you via this forum but seems to be broken; I was unable to email myself via this site.  If you are interested in exchanging specific ideas and project info for Chat in RPG I would be happy to do so.  You might be interested in influencing or contributing to one of my projects having to do with a lot of what you are talking about.  smile  my email is made up of my first name at my last name under the org domain.

 

 
  [ # 4 ]

Todd, I’m sorry to hear that you had trouble with the email system. I’m in the process of testing it, and part of that testing involved sending you a message. please let me know if you get an email.

 

 
  [ # 5 ]
Dave Morton - Mar 3, 2015:

Todd, I’m sorry to hear that you had trouble with the email system. I’m in the process of testing it, and part of that testing involved sending you a message. please let me know if you get an email.

nope.

 

 
  [ # 6 ]

Ok, thanks, Todd. I don’t see any error messages in the admin logs, so I’ll have to “bump this up the chain” and have someone higher up check into it.

I didn’t get one from myself either, but I more or less expected that. It’s sort of silly to try to email yourself, I think. smile

 

 
  [ # 7 ]

Has anyone gotten ChatScript to communicate with a WebGL build of Unity 5? They have changed a number of things in this iteration and it doesn’t look like our existing code is going to work.

We are trying to convert all our projects to the new version because of the challenges of getting the plug-in version to work across our firewall.

Thanks,

Doug

 

 
  [ # 8 ]
Doug Danforth - May 8, 2015:

Has anyone gotten ChatScript to communicate with a WebGL build of Unity 5? They have changed a number of things in this iteration and it doesn’t look like our existing code is going to work.

We are trying to convert all our projects to the new version because of the challenges of getting the plug-in version to work across our firewall.

Thanks,

Doug

hmn - I’ll take a look if I have time this weekend and see if my tcp code works under unity5 - i only checked the chatscript native plugin code that runs in process.  The same code should connect to tcp server if the plugin does’t load but never got tested because the native chatscript plugin loaded.

Native code plugins don’t work in the web player for obvious reasons - and my game isn’t a web player game - so never checked that either.  smile

 

 
  [ # 9 ]

Sorry to resurrect this thread but I have never worked on a chatbot before and I am trying to implement a simple chatbot for a class project. I am not new to coding, I’m currently a senior majoring in Computer Science. I don’t need to build anything revolutionary, just a simple chatbot, preferably that can do TTS.

I guess I’m wondering if your Unity project is completely dead or not?

 

 
  [ # 10 ]

I would also like to know how this project has gone. I’ve had similar thoughts on wanting to use Chatscript bots for in-game NPCs, based in Unity.

 

 
  login or register to react