Additional words "fire" "help" "run" are added to dictionary. Now the dictionary has 3 names, 3 non-names and each agent is trained to recognize its name as well as 3 words.
Basic multiple word recognition logic implemented is as follows:
1. Each agent is associated with a buffer used to store perceived phonemes. Buffer start with length 0
2. Each buffer has toggle which indicates whether it is currently receiving more phonemes into the buffer. True for actively receiving, false for not receiving.
3. Whenever a phoneme is perceived, we loop through all the phoneme buffers of this agent. If a buffer is receiving, the phoneme is added to the buffer. If not, but the phoneme is equal to the first phoneme of the word, this buffer is toggled active and the phoneme is added to the buffer.
4. If a phoneme is added to a buffer and is not the first phoneme of the word, we calculate the likelihood of current phoneme sequence being the sequence consisting this word. If the likelihood is decreasing faster than a threshold, we conclude the sequence is not originating from the word under discussion and the buffer is cleared. If the likelihood is increasing, above a certain threshold and the number of phonemes in the buffer is equal to that in corresponding word, a matching word has been found. The agent will turn red (or more complicated behaviour to be implemented later) and all the buffers will be reset for reception of next word.
Currently still testing to fix some minor errors, hopefully make a demo tommorow!
No comments:
Post a Comment