Talking To Computer AI

Blitz3D Forums/Blitz3D Programming/Talking To Computer AI

Luke111(Posted 2009) [#1]
I have been planning for a while a program where you can input text and the AI Talks back to you using a dictionary of sentences and speech libraries. I am working on it right now. This forum is for discussion on ways to do this and whatever else u wanna talk about.


jfk EO-11110(Posted 2009) [#2]
I tried to make a simple speech app some time ago. I was using Siblings, eg:

i a o u e
bi ba bo bu be
ci ca co cu ce
di da do du de

etc., plus of course a set of all chars in "standalone" form: T! B! P! ...

Because all we say is made of siblings, eg. If you try to assemble siblings "on the fly", it will sound bad, eg: moh - the m fades smoothly to oh, so you cannot assemble it from a M and a O.

Well, however, I didn't continue the project because I had to handle about 100 Soundfiles, and they loaded extremly slow. I even don't know why they loaded so slowly, it took 2 Minutes or so only to load the OGGs.

When there was a way to save all siblings in one soundfile and then play them individually, then it might be an option.

Even with a complete set of all possible siblings you still need a lexicon with some kind of "byte-code" that helps to spell things right. So the app may interprete a world like "Station" as "Steh-shon".

It's a lot of work and if there were any good, free and easy to use speech solutions out there, I would use them instead. Windows comes with speech, at least since XP, and it should be possible to use it with userlibs. If I recall correctly then there's even an example in the code archives, I guess in section userlibs or sound.


Andy(Posted 2009) [#3]
How elaborate do you want the AI to be?

>the AI Talks back to you using a dictionary of sentences

That sounds like Eliza


Ginger Tea(Posted 2009) [#4]
When there was a way to save all siblings in one soundfile and then play them individually, then it might be an option.

Even with a complete set of all possible siblings you still need a lexicon with some kind of "byte-code" that helps to spell things right. So the app may interprete a world like "Station" as "Steh-shon".


its better to have as many fiiles in one as possible for a multitude of reasons
the best being economical on clusters, i had to install novel from floppies once when doing an IT course, one disc was just small byte files and one 1.44mb disk took an hour to copy compared to the few seconds to copy one 1.44mb file.

one of the startreck TNG games (perhaps after interplay?) had 'real' speech from the main actors, they read a patented script of gobeldygook that contained all the phonetics for english and a data file was paired to each recording so it knew where each part of a word should be read from
so you could have jean luc reading shakespear or the news and have it still sound semi authentic and this was in the early-mid 90's on DOS boxes

so you have two problems to face, a turing test style AI and a text to speach program, which used to be easy on the old 16bit micros due to having sound chips instead of wav mp3 etc, its a lesser quality granted but you could pack all the sounds into a floppy disk for the st or amiga to process, yet we left those behind after the creative/adlib days when wav's started to florish


Luke111(Posted 2009) [#5]
I am stumped on the AI and I know how to handle the UI and CG Speach. If you have any ideas on the AI that would be of great help. Im running 3 computers. 1-Athlon 64 X2 2.40GHZ 4GB RAM, 2-Sempron ?GHZ X1 512 MB RAM, 3-Core 2 Duo 3GHZ 4GB RAM. The Athlon's Windows Vista, The rest are Ubuntu Linux.


Ginger Tea(Posted 2009) [#6]
text based ai probaly evolves like chess ai
start off with the basics, like which piece goes where and how it can move
play it alot
let it learn how to 'think ahead' instead of just thinking a gazzilion moves in seconds based on what you might move

perhaps start it off with simple pre written phrases that work off one key word in the users text
one odl one when you meantioned relativity it would always say
"tell me more about your mother"
your talking einstein(sp) and its thinking of milf

there is alot of research on this, wiki and google are your friends


Andy(Posted 2009) [#7]
>I am stumped on the AI and I know how to handle the UI and CG Speach. If you
>have any ideas on the AI that would be of great help.

AI is a BIG subject. You should basically try to construct a chatterbox program. How hard it is depends on what you want to achieve.

An Eliza type program is relatively easy, and you can add memory and a bit of ingenuity on the AI part, which will go over well with your users.


jfk EO-11110(Posted 2009) [#8]
Seems like I misunderstood the topic. AI, really BIG subject.

Implement a strong "need" for some goal the AI wants to achieve. Add memory, free functional combos and learning routines. AS long as the AI can interact, it will try to find the perfect behaviour to achieve its goal.


Knight #51(Posted 2009) [#9]
I think what would be cool is once you get it to work. Set it up to where two or more people could communicate over the net using TCP\IP....UDP....DirectPlay....whatever. THATWOULDBESOCOOL!!!!!!


Luke111(Posted 2009) [#10]
I am going to take your advice and put together an AI that has a library of speech, and uses it in many ways; like putting together sentences, thinking ahead, and possibly even a net chat with the AI. I will be using my Linux box as the server under wine. Thanks for the help!!!
http://www.nanogamesusa.webs.com (still working on it)


jfk EO-11110(Posted 2009) [#11]
I'd suggest to lower your expectations in the beginning, start small.

Here's an example that wouldn't be too hard:

AI must try to get the users attention as often as possible (esp. when he's away from keyboard). This requires some user reaction analysis. If the user hast to do unnatural actions just to signal that he's there (eg. when he has to press Space ) then the interaction may not work as desired. The interaction must be very easy for the user. And even then, the AI takes a lot of interaction time to learn what is successful behaviour and what not. Just like a baby, when it says the first word, it will get a lot of attention from the parents - and this attention is one of the basic needs of a baby.

An other idea would be: the AI must try to make the user laugh.