CodeWalrus

Development => Calculators => Calculator News, Coding, Help & Talk => Topic started by: alexgt on April 01, 2015, 09:27:58 PM

Title: Artificial Intelligence help
Post by: alexgt on April 01, 2015, 09:27:58 PM
This topic is mainly for my project JarvAXE 5.0 because I need help with my AI response system but this topic is open to anything to do with interactions that have some intelligence behind them like a chess CPU.

(I quote myself)
QuoteThe way he responds is when I press a key it records that key code in a buffer then when I press enter it adds those codes up into a buffer until it hits a space then it goes into the next spot and so on, after that    I use a for loop checking for values in the buffer that match with 130 which is "hello" and all the other responses. My only option is when I  finish a word I take that and compare it to the next word and it's meaning and then store those values into an appvar but the appvar would get very big very fast and I would have to have it in RAM because I will have to write to it :(. I could probably put the values into free ram but I will still have to open up alot of ram when I unarchive the appvar.
How could he learn?
Title: Re : Artificial Intelligence help
Post by: Dream of Omnimaga on April 02, 2015, 06:36:37 AM
Hmm I am curious if @Travis might be able to help on this... He made a similar program for the TI-89 in 2012.
Title: Re : Artificial Intelligence help
Post by: Travis on April 02, 2015, 11:44:34 PM
The TI-89 program just output phrases based on a RNG seed, and all the vocabulary was static—there was no learning. Nikkybot is a fully interactive bot with some weak AI, but since it runs on a PC, storage space for learning isn't much of a concern.

I haven't had much experience writing things like this on a memory-limited platform. You may not be able to do much except simply limit the amount of learning it does. Perhaps you could keep track of how often each piece of information is used, and when memory gets low, just have it forget the stuff that was used the least.

You might be able to do clever tricks like compression, but this tends to add significant complexity and reduce performance. I've written programs on the TI-89 and HP 50g for myself that needed to track more data than can fit in RAM at once, and I did this by breaking the dataset into groups of variables small enough to individually fit in RAM and writing an abstraction layer for reading/writing it that figures out what's currently in RAM, where to find the requested data, and handle shuffling stuff in and out of flash as needed. They worked but weren't terribly fun to write and debug, and the extra overhead makes everything really slow.
Title: Re: Artificial Intelligence help
Post by: Dream of Omnimaga on April 03, 2015, 02:11:36 AM
Was NikkyBot for the 89 written in BASIC, by the way?
Title: Re: Artificial Intelligence help
Post by: Travis on April 03, 2015, 03:43:53 AM
I started NikkySim in TI-BASIC, but it took a minute to generate every sentence, so I rewrote the program in C for release. I believe I included a copy of the BASIC prototype in the ZIP just for fun, though.