Author Topic: The easiest kind of game to write?  (Read 13316 times)

igamealot

  • Guest
Re: The easiest kind of game to write?
« Reply #15 on: January 22, 2013, 06:34:33 PM »
You've never met ELIZA or A.L.I.C.E or Cleverbot?

ELIZA BASIC source code source from here which is full of details and different versions.

Here's  my Lua version of someone's BASIC version.
« Last Edit: January 22, 2013, 07:25:03 PM by igamealot »

Mopz

  • Guest
Re: The easiest kind of game to write?
« Reply #16 on: January 25, 2013, 08:02:00 AM »
I've always wanted to write a chatbot, or just something that analyzes statements and saves them for answering questions. It wouldn't be too difficult writing something that uses an input like:

"apples are green."

, analyses it and stores information to reply to something like:

"what are apples?"

with:

"I'm sure that most apples are rather green."

The problem is that all human languages are more complicated than this :) So the scanning and saving part would have to be darned complex.

I've studied both Prolog programming and AI at the university, but ... I was more interested in computer graphics programming :)

I mean, try and analyze:

"It's my humble opinion that in most cases some apples are green to the color"

, to extract the information to make the connection "apples",  "are", "green". How do you separate the (unknown/new) nouns from the "garbage" to make a connection with an adjective?
« Last Edit: January 25, 2013, 08:14:22 AM by Mopz »

igamealot

  • Guest
Re: The easiest kind of game to write?
« Reply #17 on: January 30, 2013, 06:25:22 AM »
You always have some grammar and vocabulary structure for it to understand, or ignore, or ask to have the message rephrased, or you simply respond "I don't know. Do you?"

At the most base level you capture negative words like 'wont, cant, shouldn't, no, not" and vulgarities and respond "you shouldn't be so negative" or "are you just saying that to be difficult?" or "what do you really mean?"

You feed it nouns in context: food, nature, home, family, computers, etc.
You feed it adjectives on a value basis, positive, negative, exaggerating, counting, worth.
There must be some way of teaching sentence structure.

I bet there's a whole science to this.

In the context of teaching a kid to program though you only need to get as far as NPC interactions.
Code: [Select]
Shopkeeper={}

Shopkeeper.phrases={"hello welcome to my shop","that item costs","are you sure you want to buy it?","You don't have enough Gmoney yo!","Thank you,come again"}

Shopkeeper.items={ {"sword",1},{"shield",2},{"boots",1},{"spartan armor",3}}

In this case the user is only given a greeting, a menu of items, an option to buy or
 not buy the selection, a warning about poverty and a traditional send off.

It all works similarly.
« Last Edit: January 30, 2013, 06:38:53 AM by igamealot »