In other words, fuck those topics. I'm going to talk about Markov Chains.
A Markov Chain is a sort of probabilistic determination model that can be used for constructing random content that isn't exactly like the inputs of the function, but will strongly resemble it. (ie, if you put the english dictionary as an input, you will receive words that aren't in English, but will use the same probability for letter clumps such that they'd look English to anybody who didn't actually speak the language, and you could probably even convince a native speaker that it was just an obscure word that they'd never encountered before).
To make an example, lets generate a Markov chain using "Supercalifragilisticexpialidocious" as the input. First, we break the word into the component probabilities of each letter. This looks like the following:
- aaa (3/35)
- ccc (3/35)
- d (1/35)
- ee (2/35)
- f (1/35)
- g (1/35)
- iiiiiii (7/35)
- lll (3/35)
- oo (2/35)
- pp (2/35)
- rr (2/35)
- sss (3/35)
- t (1/35)
- uu (2/35)
- x (1/35)
- /EOS/ (1/35)
- i -> a (1/7)
- i -> c (1/7)
- i -> d (1/7)
- i -> f (1/7)
- i -> l (1/7)
- i -> o (1/7)
- i -> s (1/7)
So, I was thinking today about the use of Markov Chains for a learning-by-observing chat program (This is probably not a new idea, but I'm just jotting down some thoughts right now, so some of these might be tried-and-false ideas that others have already proven bad).
- In this case, we want to use words as the elements rather than characters.
- I was thinking about indefinite-order chains and worried about the amount of memory it would take to store occurrence data for every possible combination of words (even using class-based techniques that would render no need to save space for the large number of word combinations that will never show up). I realized that I was going about this the wrong way: Instead, just store the chats themselves, and construct a 2-3-4 tree data dictionary that contains an entry for each word that has been encountered by the program so far, with a linked list of pointers to which chat "sentence" the word appears in. If you have already generated the words "How are you", you would first obtain the list of sentences that contain the word "you". Next, obtain the list of sentences that contain the word "are". Generate a list of sentences that contain both words, and investigate each chat log in this list to see if the two words appear in the order "Are you". If no such sentences occur, then construct a probability list from the list of words that appear after "You". Otherwise, search to see if there are sentences that contain the phrase "How are you" using the same method used to find "Are you", and resort to building a list from "Are you" if there are none to be found.
- The Chain should be two-dimensional: Probabilities would be determined by taking the probability of any given word based on the words already generated for the sentence, and taking the probability of words appearing in the sentence after words from the current question.
- This means that the chatbot would need to store logs of its own statements so it could see how people respond to them, but not use them for data themselves (because they would be either inaccurate, and thus result in the loss of bot accuracy, or they would be accurate, in which case the bot most likely has good data already for that situation and doesn't need more).
- If one wanted to create artificial intelligence (either "True" AI, combat AI for games, for exploration, or what have you), I think one would just have to program a Markov chain that could recognize actions as the elements making up the chain (ie. Stimulus happens, so take this action.) One could also maybe create predictive chains, where a bot sees a fire, remembers seeing somebody put their hand in the fire, and realizes that this course of action is more likely to lead to undesirable outcomes (ie. being burned), and thus weights the course of action down.
No comments:
Post a Comment