|
|
Experienced member
Total posts: 71
Joined: Sep 24, 2012
|
Hi there,
I wanted to introduce myself and our project. I work at Ohio State University in Columbus OH, USA and have been working for a number of years on creating Virtual Patients for medical education. Our patients were initially created in Second Life using AIML as our chatbot technology. We have recently switched to using Unity for avatar development and Chatscript to manage the dialogues.
Our primary reason to switch to Unity was to achieve higher fidelity avatars which display emotional responses and facial expressions based the dialogue. Plus we wanted a web based version as well as a stand-alone option for the interface.
We switched to Chatscript because, as our patients grew in complexity and number it became increasingly difficult to scale the AIML and keep the conversations on track. We currently generate >200,000 AIML patterns for each patient any my poor server was buckling under the load. We have a database of the Q and A which generates an XML file that we convert into AIML, so it’s not an efficient generation of AIML but the syntax is largely invisible to the case creators.
I decided that rather than trying to re-code our existing system to generate Chatscript syntax, I would code one patient by hand to understand the features of Chatscript. Bruce has been incredibly magnanimous with his time and patient with my endless naive questions but we have almost finished the creation of our first patient in Chatscript.
The aims of the project are to use Virtual Patients to teach history taking and clinical reasoning skills to our medical students. We have created a “Virtual Patient” room in our clinical skills center with speech recognition (Dragon) and near life-sized avatars (70” HDTV) so our students can speak questions and receive verbal responses. Fun stuff.
That’s enough for now. I look forward to participating in this forum.
Doug Danforth
|
|
|
|
|
Posted: Sep 30, 2012 |
[ # 1 ]
|
|
Administrator
Total posts: 3111
Joined: Jun 14, 2010
|
Hi there, Doug, and welcome to chatbots.org!
The project you’re working on sounds amazing and very worthwhile. Keep up the good work!
|
|
|
|
|
Posted: Oct 1, 2012 |
[ # 2 ]
|
|
Experienced member
Total posts: 52
Joined: Apr 9, 2012
|
Welcome Doug! Your project sounds very interesting. Can you share some of your experience in developing the virtual person? Do you have to implement contextual dialogues - what I mean is something like the following scenario:
Doctor: Where are you feeling the pain.
Patient: In my chest.
Doctor: Is it both side or just left side. (context sensitive, understand we are talking about chest)
Thanks!
|
|
|
|
|
Posted: Oct 1, 2012 |
[ # 3 ]
|
|
Experienced member
Total posts: 71
Joined: Sep 24, 2012
|
Francis Wang - Oct 1, 2012: Welcome Doug! Your project sounds very interesting. Can you share some of your experience in developing the virtual person?
Hi Francis,
Thanks (also to Dave) for the welcome.
For the avatar side of this we have used our motion capture studio to create realistic gestures. I had my medical students wear the motion capture suits and play the part of the patient. We captured their movements and mapped them to the avatars in Unity.
For facial expressions we used Ekman’s emotions (plus nervousness and pain) to map the specific facial movements. I have a graduate student who is working on this project for his Master’s thesis.
Francis Wang - Oct 1, 2012:
Do you have to implement contextual dialogues - what I mean is something like the following scenario:
Doctor: Where are you feeling the pain.
Patient: In my chest.
Doctor: Is it both side or just left side. (context sensitive, understand we are talking about chest)
Thanks!
This is very important for us and was one of the reasons I switched to Chatscript. I was struggling to manage this appropriately in AIML.
I have created topics for the various symptoms and categories (pain, backpain, medications, etc.) and also created concepts for these as well. I also created a concept called ~itwords [it this that them, etc] and use patterns like (describe your [~backpain ~itwords]) so I can match “describe your backpain” and “describe it”. Obviously the latter requires that we are in the correct topic to match correctly. Finally Bruce helped me write some code to determine whether we were discussing current symptoms, family history, or past medical history questions. As such, I have topics such as ~currenthypertension, ~pasthypertension, and ~familyhypertension and direct the responses to the appropriate topic based on whether the question asks about family, past, or present.
It still gets dicey sometimes because students (especially inexperienced ones) will wander in and out of topics several times during a conversation. We have done pretty well so far but ocasionally we get some pretty funny responses.
Doug
|
|
|
|
|
Posted: Oct 1, 2012 |
[ # 4 ]
|
|
Experienced member
Total posts: 52
Joined: Apr 9, 2012
|
Thanks Doug. This is really fantastic stuff. I think the ability to control topic flows is one of Chatscript’s major strength.
|
|
|
|
|
Posted: Oct 1, 2012 |
[ # 5 ]
|
|
Senior member
Total posts: 498
Joined: Oct 3, 2008
|
> http://twitter.com/mendicot/status/252764377382539264
Added new semi-automated Meta Guide webpage, Best Virtual Patient Videos http://goo.gl/lCCJT .. all about virtual patients & virtual nurses
|
|
|
|
|
Posted: Oct 2, 2012 |
[ # 6 ]
|
|
Experienced member
Total posts: 94
Joined: Dec 8, 2011
|
Welcome Doug,
what will happen with all your AIML-files?
Having so much of them, I think it could be useful
to translate them in a first as I proposed:
find “<li>” replace “[”
find “</li>” replace “]”
find “< pattern>” replace “u: (”
find “</pattern>” replace ) “^noerase()”
delete: <category> </category> <template><random> </random></template>
and any other AIML-tag you used
before giving them the higher skills of ChatScript
in a second step?
ChatScript works fine with my corsica-example shown here:
http://www.chatbots.org/ai_zone/viewthread/444/P15/
(Ideas for improvement still welcome.)
All the best
Andreas
|
|
|
|
|
Posted: Oct 2, 2012 |
[ # 7 ]
|
|
Experienced member
Total posts: 71
Joined: Sep 24, 2012
|
Hi Andreas,
We initially considered that approach, but I felt it was important to learn the Chatscript language more fully first by hand coding one patient. Then we could see if the conversion approach was warranted.
The absolute number of our AIML patterns is somewhat misleading since we generate so many of them automatically. Our database contains main questions and then the variations. The variations are largely hidden from the case creators. Our variations look like this:
{ * / } what brings you {in/in to see me} today { * / }
We then convert that into the following patterns automatically.
What brings you in today
* what brings you in today
what brings you in today *
* what brings you in today *
what brings you in to see me today
* what brings you in to see me today
etc.
So, with one pattern we generate many, and the number increases rapidly as you add more and more “synonyms” to each sentence. Along with a few other tricks we quickly generate a very large number of patterns from a few variations, mostly to account for the fact that the AIML * requires a word (why is that?).
So for us, the real gold is not really in our AIML but in the database of the Q and A. We are in fact, rewriting the database code and the XML converter to generate Chatscript directly. That will require that I delete all of the { * / } pieces etc, but that is a manageable task.
Regards,
Doug
|
|
|
|
|
Posted: Oct 2, 2012 |
[ # 8 ]
|
|
Experienced member
Total posts: 94
Joined: Dec 8, 2011
|
Hi Doug,
now I see the point.
Your example shows very good
the benefits of ChatScript-coding.
Apropos:
I think a lot of people would be very grateful
for every line of code, that would show what can be done with ChatScript.
One of the few points
where AIML is still ahead of ChatScript:
there is no free ChatScript-set to inspire writers like jet.
Regards,
Andreas
|
|
|
|
|
Posted: Oct 2, 2012 |
[ # 9 ]
|
|
Administrator
Total posts: 2048
Joined: Jun 25, 2010
|
I must admit I would love a wildcard in AIML which represented either something or nothing. For example:
DO YOU LIKE EGGS ~
Would match:
Do you like eggs
and
Do you like eggs for breakfast
|
|
|
|
|
Posted: Oct 2, 2012 |
[ # 10 ]
|
|
Experienced member
Total posts: 71
Joined: Sep 24, 2012
|
Andreas Drescher - Oct 2, 2012: Hi Doug,
Apropos:
I think a lot of people would be very grateful
for every line of code, that would show what can be done with ChatScript.
One of the few points
where AIML is still ahead of ChatScript:
there is no free ChatScript-set to inspire writers like jet.
Regards,
Andreas
Hi Andreas,
I am of two minds about this. On the one hand, having a large bank of existing code would be very helpful - Lord knows I spent a lot of time making dumb mistakes and getting a lot of patient advice from Bruce.
On the other hand, I feel like I have a much better grasp of what I have done and how I can manage it going forward. If I had just cut and pasted a bunch of code into my scripts I don’t feel like I would be able to debug things as well as I can now. Having to learn everything from scratch was a slow process, but worth the time and effort spent. It also forced me to re-think all of my patterns and my approach to managing the conversation.
That being said, whereas I still know very little about all of the features of ChatScript I would be happy to pay it forward in any way I can and help others get started.
Doug
|
|
|
|
|
Posted: Oct 3, 2012 |
[ # 11 ]
|
|
Experienced member
Total posts: 94
Joined: Dec 8, 2011
|
Hi Doug,
hi Steve,
I don´t mean “copy and paste” using the word “inspiration”.
When I found Steves (who felt in a way that I am talking about his work:) whatday_eng.aiml,
I didn´t simply translate it for my german bot, but I saw, what could be done
and created new <li>s for every day of the year,
which are connected to the existing knowledge of my bot MALDIX.
But I´m very grateful for your offer to help others get started,
because I´m sure to become one of these “others” soon: )
Regards,
Andreas
|
|
|
|
|
Posted: Oct 4, 2012 |
[ # 12 ]
|
|
Member
Total posts: 6
Joined: Jan 31, 2012
|
>> One of the few points where AIML is still ahead of ChatScript: there is no free ChatScript-set to inspire writers
I agree. There’s a lot of useful AIML out there. Having a ready & free to use bot in ChatScript to base your own bot on would be awesome. Wasn’t there an initiative to create such a ChatScript-set together in a combined effort?
|
|
|
|
|
Posted: Apr 18, 2014 |
[ # 13 ]
|
|
Senior member
Total posts: 160
Joined: Mar 22, 2014
|
Hey Doug,
Your project sounds pretty awesome, do you have any videos of it in action? The character rigging sounds cool. I’m curious - have you found a way to embed chat script in unity (doable via dll I think) or are you using the server and tcp?
I’ve hooked up unity to chat script for a game I’m creating using chatscript server and tcp ( currently working to make it threaded and use coroutine for better responsiveness ), but haven’t gotten around to embedding it yet, just started working on that and was wondering if you already had a leg up.
|
|
|
|
|
Posted: Apr 18, 2014 |
[ # 14 ]
|
|
Experienced member
Total posts: 71
Joined: Sep 24, 2012
|
Hi Todd,
I don’t have any videos worth showing. I should probably make some demos of the patient’s expressions and interactions with the students.
We communicate from Unity to our ChatScript servers - we have not tried to embed CS in to Unity yet. If we ever get around to creating an IOS version of our patients then I will look into that.
I have several Windows Server VMs that run CS and the Unity WebPlayer. With the new fix to the Windows Server code they don’t even register hardly any activity when we are pinging away with questions. I haven’t tried any sort of server stress test but we have had students asking questions of three different patient’s at the same time from teh same instance of CS and don’t see any difference in performance.
Doug
|
|
|
|
|
Posted: Apr 18, 2014 |
[ # 15 ]
|
|
Senior member
Total posts: 160
Joined: Mar 22, 2014
|
It’s not performance concerns that is driving my own need for embedded - I’m trying to roll out a client based/multi-server game - where the game server runs on one of the clients and the others join that game, i.e. not a central server model. I’m an indie developer and don’t have the kinda cash to run a data center. :D
|
|
|
|