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

igamealot

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: The easiest kind of game to write?
« Reply #15 on: 22. January 2013, 19:34:33 »
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: 22. January 2013, 20:25:03 by igamealot »

Marcus

  • Globaler Moderator
  • Full Member
  • *****
  • Posts: 245
    • View Profile
    • NaaLaa
Re: The easiest kind of game to write?
« Reply #16 on: 25. January 2013, 09:02:00 »
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: 25. January 2013, 09:14:22 by Mopz »

igamealot

  • Newcomer
  • *
  • Posts: 16
    • View Profile
Re: The easiest kind of game to write?
« Reply #17 on: 30. January 2013, 07:25:22 »
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: 30. January 2013, 07:38:53 by igamealot »