Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

ai chatbox

edited September 2013 in Questions Posts: 10

hi people!

I've recently bought Codea as a training tool to learn the ways of programming. I've started this year as a student informatics programmer in high school and notice what a help Codea and the Lua language is!

But I'm stuck with my newest try out...

I would like to create some sort of chatterbox program, a program where you ask a question and the computer gives a respons. Maybe the possibility to link to google would be a lovely addition.

I was thinking about using cider, but don't succeed in shaping something useful.

Can someone help me how to start a decent question-answer code?

Thank you so much in advance!

Comments

  • edited September 2013 Posts: 226

    Hi! May be (may be not), this can be helpful: http://twolivesleft.com/Codea/Talk/discussion/3552/text-input-for-pseudo-ai-solved
    Greetings.

  • Great help! Thank you enormous!

  • edited September 2013 Posts: 10

    I still have a little question. How do you create a question with multiple possible answers?
    Like; occupation? Farmer; cool, so u like cows?!

    Thank you in advance!

  • dave1707dave1707 Mod
    Posts: 7,874

    One problem you'll be having is showing answers for something you don't expect. If you ask for occupation, and they answer brain surgeon, what do you answer with if you don't expect that. You're going to need a lot of generic answers. One way is to create a table with answers that get picked at random. If they answer with an occupation that you do have, you can also have a table of multiple answers that get picked at random so it's not the same answer all the time.

  • May be something like: http://en.wikipedia.org/wiki/ELIZA

  • Hi!

    I've slept over the idea and found a few (possible) solutions.
    Thanks Quezadav and Dave 1707 to help me on my way!

    The start would be a simple conversation, that might get more complex in a further stage.
    If I'm correct I will have to create a "random function" and answers that are relativily neutral. After those parts I have to add a "save function" so the player won't have too many déjà vû's.

    Of course it will be a titans work to create something like that, but once the program is made the text input will be a piece of cake.

    If you know a more easy way, let me know :).

    Kind regards!

  • Yes, ELIZA is the classic solution.

Sign In or Register to comment.