🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Computer understands your text and is able to speak back

Started by
34 comments, last by Minsc&Boo 7 years, 9 months ago

LAURENT*, on 13 Sept 2016 - 03:05 AM, said:snapback.png

I'll get serious around the winter and draw diagrams and finally midway thru spring it will time to execute the ideas.

Winter is for drawing, while spring is for executing.

Summer and fall is for idle discussions on a message board.

Haha true dat xD, well for my part I prefer to start coding already :P

Advertisement

Do note that this is trivially breakable already.

Is that supposed to break it? As far as my understanding of English grammar goes, this is an imperative form, which is kind of an order, so to speak.

Is that supposed to break it? As far as my understanding of English grammar goes, this is an imperative form, which is kind of an order, so to speak.

It was mostly tongue-in-cheek, but was meant to indicate that "seeing 'do' at the start and knowing that's a question" is not a particularly good assumption. Starting a sentence with "do" in English is not a guarantee that the following is a question. It's fairly easy to poke holes in a lot of text-parsing algorithms that rely on that level of rules abstraction. Whether or not that matters for the quality of parsing the OP wants is unclear.

If you're actually looking for examples of how to do this in a game, look up Event[0], which has a text interface to an AI.

Also, if you're parsing an English sentence, you don't want to read it from left to write, you want to evaluate the syntactic dependencies or phrase structure grammar. The most basic form of this is working out the verb and the subject and object. Which is why the earliest text adventure parsers worked with two-word commands: an action, an object to perform the action on. (The subject was implied: You wanted to do the thing.)

NLTK, SpaCy, OpenNLP, or the equivalent libraries for your programming environment have already implemented solutions for this that handle more complex sentences. As have the open-source chatbot platforms.They can even work without punctuation, if that's what you really want. (Or, going the other way, there's word-classification networks trained on Twitter and Reddit that recognize emoji.)

And as has been said above, remembering what happened last session just needs serialization: save what you've got in memory to disk, load it from disk next time.

Read this and understand...

https://www.amazon.com/Most-Human-Artificial-Intelligence-Teaches/dp/0307476707

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This may give you ideas too: http://www.wildml.com/2016/04/deep-learning-for-chatbots-part-1-introduction/

keep on ;)

This topic is closed to new replies.

Advertisement