Ai Dreams Forum

Member's Experiments & Projects => General Project Discussion => Topic started by: Bragi on May 13, 2010, 06:33:54 pm

Title: NND & AICI
Post by: Bragi on May 13, 2010, 06:33:54 pm
Hello everybody,
I just made a new release of my neural network designer, which also contains (the beginnings of) a small chatbot demo, called AICI. I think (hope) that with this new version, I am finally reaching  the edges of usability. Although there is still plenty to do, I guess it's time to move the project into a new phase. So I am looking for a few brave souls willing to:
I have put up a little download section (http://janbogaerts.name/index.php/downloads/) where you can find everything. If there is anybody interested in doing some beta testing, let me know, and I'll put up a public bug-tracker.
Title: Re: NND & AICI
Post by: TrueAndroids on May 13, 2010, 07:27:46 pm
Sounds really cool Bragi. Nice to see so many artists, designers, developers, etc on this forum!
Title: Re: NND & AICI
Post by: Freddy on May 13, 2010, 09:02:35 pm
Yes sounds really good to me too.  Also very complicated at first glance ;)

Be sure to check out my post on blogging and hopefully we can help get you some more exposure.
Title: Re: NND & AICI
Post by: Bragi on May 14, 2010, 12:30:07 pm
Quote
Also very complicated at first glance
Yes, the learning curve might be a bit steep. It's all seriously out of the box. I was hoping to alleviate some of that pain through a good UI. I'm also not expecting many people to ever build networks completely from scratch, as I did, but instead add to the already existing code (for instance, make aici, based on an example, copy files). Or take a few existing modules to create a new network (for instance, take the 'core functionality', a module to do calculus and a module for visual processing). People with a programming background should find many things familiar, like variables, assignments, conditional statements (aka if/do/while/for each). At it's core it's very similar to a tuned up stack machine.
Title: Re: NND & AICI
Post by: wgb14 on May 14, 2010, 01:08:46 pm
Hi I downloaded the chatbot but it says the brain file is missing....
Title: Re: NND & AICI
Post by: Bragi on May 14, 2010, 01:18:27 pm
Ok, that's a problem. Hold on, I'll do an install on a clean machine. I do know that it works if you also install the designer, since this also contains the AICI network. 
Did you manually start it?
Title: Re: NND & AICI
Post by: Bragi on May 14, 2010, 01:39:46 pm
Found it: I don't have any spaces in file paths, you probably do, the installer tripped on this. Thanks for letting me know this. I'm updating now, if you download again in, say , 15 minutes, it should be fixed.
PS: you'll probably have the same problem with the designer, when opening a demo project from the start menu.
Title: Re: NND & AICI
Post by: Freddy on May 18, 2010, 09:43:18 pm
How long have you been working on this Bragi ?  It looks really advanced to me, in more ways than one.
Title: Re: NND & AICI
Post by: Bragi on May 19, 2010, 01:12:11 pm
A little over 2 years now. Yes the whole thing is fairly advanced. It's a bit a chicken and egg thing: even though the basic concept is very simple (give the link between 2 neurons a meaning), to get something working, you need to provide a whole lot of initial data, in complex structures. I kind of figured I'd better try to make the barrier as low as I could, and working with long lists of numbers didn't seem to meet that, hence the designer.
Title: Re: NND & AICI
Post by: Freddy on May 20, 2010, 03:06:22 pm
I see, thanks for explaining.  Looks like you have done a lot in two years then.  8)  I'll find some time over the weekend to explore more fully.
Title: Re: NND & AICI
Post by: lrh9 on May 23, 2010, 11:24:28 pm
Is it open source?
Title: Re: NND & AICI
Post by: Bragi on May 24, 2010, 01:17:26 pm
The designer data is indeed included with the aici network.
Title: Re: NND & AICI
Post by: sunama on May 30, 2010, 04:36:25 pm
I just read the last few posts of your blog.

What interested me most was your last post, involving this pic:

(https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fjanbogaerts.name%2Fwp-content%2Fuploads%2F2010%2F05%2Fimage17.png&hash=c8105913a0451b1e76ad18a47e9dd5f25e0b2edb)

Have you managed to get the correct answer yet?

Have you tried using easier input:

EG:
User: I have 2 hands.
User: Each of my hands, has 5 fingers.
User: How many fingers do have on 2 hands?

This is more simpler and would be a better start.

Also have you tried putting in some basic mathematics.
EG:
User: what is two plus two.

What output do you get for this?

I think it will be very impressive if you can get the correct answer to the questions you asked in the image (from your blog).
Title: Re: NND & AICI
Post by: Bragi on June 01, 2010, 01:28:00 pm
Quote
Have you managed to get the correct answer yet?
Almost, I bumped into a small delay this weekend (a bug-fix caused the core to run a little faster, revealing a few new deadlock situations, which had to be fixed to get back to testing). This week, the bugs should be removed from the count algorithm if there are no more unexpected issues. Off course, I will than have to move the search code over to the noun resolvers, which don't have the fancy search yet.

Quote
Have you tried using easier input:

EG:
User: I have 2 hands.
User: Each of my hands, has 5 fingers.
User: How many fingers do have on 2 hands?
Less statements are not equal to easier for AICI. It doesn't matter how many or few you give for the algorithm. What's important is the structural complexity of the statements, their order, completeness and if it can be learned ('on' is not yet handled correctly by aici and this is a word who's meaning can't be learned, it needs to be coded) . Also, I wanted to test a few more (hidden) situations that aren't included in your statements. Here's a detailed description of each statement:
- a human's components are bodyparts: AICI doesn't know the word bodypart. With this statement, we make bodypart behave like 'component. Also, this is used to check if AICI can find plurals in unknown words.
- a hand is a bodypart: the word 'hand' was unknown.
-fingers are bodyparts: finger is unknown. This is also to test if the system correctly cancels out the 2 undefined plurals
-a hand has 5 fingers, a human has 2 hands: the actual data that needs to be counted. this tests if it is stored correctly
-i am a human: this statement is very important: it binds the concrete 'me' to the previous abstract knowledge. It is used to test if  AICI can correctly link abstract with concrete. In your example, there is a direct link between 'i' and hands. With these statements, you don't have this, which is an added layer of complexity that I wanted to test.

Quote
Also have you tried putting in some basic mathematics.
EG:
User: what is two plus two.
This is actually easier to implement compared to the counter. The network has mathematical instructions (+-/*%), though AICI doesn't yet know the word 'plus'. Once it know's this, it is simply a matter of attaching the 'add' instructions.
Title: Re: NND & AICI
Post by: sunama on June 01, 2010, 02:22:44 pm
Less statements are not equal to easier for AICI. It doesn't matter how many or few you give for the algorithm. What's important is the structural complexity of the statements, their order, completeness and if it can be learned ('on' is not yet handled correctly by aici and this is a word who's meaning can't be learned, it needs to be coded) .

Ok, Lets remove the 'on' and try something more simple.
What happens when you type the following:

User: I have 2 hands.
User: Each of my hands, has 5 fingers.
User: How many fingers do have?

I'm interested in the result of this input as I'm now thinking that I wish to incorporate this sort of "thinking" in my own program.

I must confess that although I have read your thread, it was difficult for me to understand what is actually going on. But, its pretty obvious that if you are able to get correct output from your program, then you are on the right track. What will be impressive is if you can get the correct output to the questions you gave in the image, you posted in your blog. That will be a breakthrough.
Title: Re: NND & AICI
Post by: Bragi on June 01, 2010, 02:42:57 pm
Quote
User: I have 2 hands.
User: Each of my hands, has 5 fingers.
User: How many fingers do have?
This would almost work. I still have to do 'each', similar as 'both'. If you were to leave out that word and the comma, it would work. You basically declared the smallest amount of data that needs to be supplied to do the calculation.
I am currently at the stage that the most tricky part is, to get the sentences parsed correctly. This occasionally requires some manual adjustments.
To me, it becomes more interestingly when I can try out things like:
-a human has 2 hand, 5 fingers each -> multiple items not yet handled correctly
-i am a human
-i am missing 1 finger -> negation is not yet  handled correctly.
or: my left hands only has 4 fingers -> overwriting of abstract data in the concrete is not yet done
-how many fingers do i have.
Title: Re: NND & AICI
Post by: Bragi on June 01, 2010, 02:46:24 pm
Quote
I must confess that although I have read your thread, it was difficult for me to understand what is actually going on.
Ye, the blog structure doesn't help since you see the end first. Perhaps it would be easier to start with the earlier posts. The application's help file also tries to explain some and the white paper explains yet another part.
Title: Re: NND & AICI
Post by: sunama on June 01, 2010, 02:54:13 pm
To me, it becomes more interestingly when I can try out things like:
-a human has 2 hand, 5 fingers each -> multiple items not yet handled correctly
-i am a human
-i am missing 1 finger -> negation is not yet  handled correctly.
or: my left hands only has 4 fingers -> overwriting of abstract data in the concrete is not yet done
-how many fingers do i have.

The above would be interesting because at that point, your program is now "thinking" and assisting in finding solutions to problems.

I would love to know when you reach this stage.
Title: Re: NND & AICI
Post by: Bragi on June 01, 2010, 03:06:12 pm
Thanks, yes it would be nice to get there. It shouldn't be to hard though. I have a clear view of what still needs to be done and how. It's just a matter of doing the work, and mostly avoiding the obstacles along the way. In the end it's still just playing with structure, that's all.
Title: Re: NND & AICI
Post by: Bragi on June 02, 2010, 04:45:16 pm
@sunama: In case you're interested, AICI can now count stuff.  Thanks for the little statement sequence, it helped me debug some more.

Time now to think about the blog caption text, Mmmm
Title: Re: NND & AICI
Post by: sunama on June 02, 2010, 05:05:24 pm
@sunama: In case you're interested, AICI can now count stuff.  

So specifically, what do you mean count stuff?

Can you give some examples of input/output? Perhaps you can update this information in your blog?

Also how does your AI respond to the following input:
User: I have green eyes.
User. What what colour are my eyes?
Title: Re: NND & AICI
Post by: Bragi on June 02, 2010, 05:08:14 pm
already done, check http://janbogaerts.name/ (http://janbogaerts.name/)
Title: Re: NND & AICI
Post by: sunama on June 02, 2010, 06:01:13 pm
already done, check http://janbogaerts.name/ (http://janbogaerts.name/)

Impressive. Your AI is now able to apply logic and not just regurgitate information.

Dealing with plurals really is a minor problem...its not a big deal.

Can you put through the following input and let me know what answer it gives:

User: I have green eyes.
User. What what colour are my eyes?
Title: Re: NND & AICI
Post by: Bragi on June 02, 2010, 06:13:41 pm
I think the previous version can already do that. You can try the AICI client. In any case, I'll be releasing a new version of the client tomorrow or so, than you can try for yourself.
Title: Re: NND & AICI
Post by: sunama on June 02, 2010, 06:35:02 pm
I think the previous version can already do that. You can try the AICI client. In any case, I'll be releasing a new version of the client tomorrow or so, than you can try for yourself.

I'm interested to know how you were able to associate the word "colour" with "green"?

My own AI is able to do this. It does this by using a word association value*.

The word association value is incremented every time a sentence is input, which has the words "colour" and "green" in it. Eventually, when enough sentences have been input containing the 2 words, the word association value reaches a high value, for the word pair (colour and green). From this point onwards, when AI receives a question, involving these 2 words and it can't answer the question using by running a basic search on previous user input, it resorts to looking for word associations.

I'm still on the look-out for another algorithm which allows the program to associate the words green and colour (obviously the word pair can be for any pair of words in the English dictionary; I am using "green" and "colour" as an example).

If you don't wish to the share your algorithm, then I will understand and won't be offended, but it would be nice to know how you have done it.
Title: Re: NND & AICI
Post by: Bragi on June 02, 2010, 07:36:27 pm
First off, the algorithm that I use runs on my neural network application. This is more akin to a new breed of hardware processor (in fact, it's a virtualization of one). So it's pretty hard to do a similar algorithm in something like VB.net or C#.
That said, the association is done similar to how a thesaurus works. In fact, in the designer, this data is displayed (and can be edited) in the form of a thesaurus. When an unknown word is found that is parsed as the 'value' of something and the 'what' that got extracted out of the sentence is 'color', the network asks the word 'color' to handle this unknown (in other words, the word 'color' needs to tag and bag the word 'green'). 'Color' creates the thesaurus relationship and indicates that the word 'green' can be used as adjective and noun.  All of this only works because the network is able to parse a subset of the English language.
Title: Re: NND & AICI
Post by: sunama on June 02, 2010, 07:53:07 pm
That said, the association is done similar to how a thesaurus works. In fact, in the designer, this data is displayed (and can be edited) in the form of a thesaurus.

Is this association done automatically or does the user have to feed the ai with the relationship between 'color' and 'green'.

When an unknown word is found that is parsed as the 'value' of something and the 'what' that got extracted out of the sentence is 'color', the network asks the word 'color' to handle this unknown (in other words, the word 'color' needs to tag and bag the word 'green'). 'Color' creates the thesaurus relationship and indicates that the word 'green' can be used as adjective and noun. 

How does aici know that 'colour' has to handle 'green'. Why doesnt aici choose 'animal' to handle the word 'green'? Does the user have to give extra input to hint that 'color' must bag and tag 'green'?
Title: Re: NND & AICI
Post by: Bragi on June 03, 2010, 12:47:48 pm
Quote
Is this association done automatically or does the user have to feed the ai with the relationship between 'color' and 'green'.
This depends. Currently, when you say: my eyes are green, and 'green' is not yet known, it will always ask what green means. Even though you had previously said something like: 'we are know going to talk about colors'. Though this is technically fairly simple to add, I just haven't reached that far yet.
If you would have said: 'the color of my eyes is green', AICI would have been able to extract the relationship.

Quote
How does aici know that 'colour' has to handle 'green'.
Perhaps first a little bit about the network, you can look at it as a free form database. If you want to create a structure (record, class,...), you can have a neuron representing the object. Fields + values are done with links. The field name is represented by the link-meaning, the value is where the link points to. A table (list, collection,...) is done with clusters, which are simply specialized neurons, that can also be used as the object, value or field name.
With this in mind, Aici is a collection of neurons that mixes data and code. So, any word can have links to code blocks (also just neurons) (or can be used to execute something). When the Aici framework finds a 'what' for an unknown 'value' in a sentence, it checks if there is a code block attached to the word using a specific, known link-meaning. If this is the case, the code is executed. If no code block is found, it reverts to default behaviour: create an 'is a' thesaurus relationship, and tag the word with a part of speech. If it was a sentence like 'x is y', an adjective is presumed. If it is a sentence like 'x has y', a noun is presumed.
Title: Re: NND & AICI
Post by: sunama on June 03, 2010, 12:57:24 pm
I understand now.

Thanks.
Title: Re: NND & AICI
Post by: sunama on June 03, 2010, 06:34:07 pm
I've now worked your question and answers into my own algorithm (I havent coded it in yet, but after its done, my AI will also be able to answer the question you originally posted).

So now that your algorithm can multiply, can it divide?

What output do you get if you type in:
User: I have 10 fingers
User: A hand has 5 fingers
User: I have hands
User: how many hands do i have?


I haven't yet come up with an algorithm for the above, but I might do that tonight.
Title: Re: NND & AICI
Post by: Bragi on June 04, 2010, 01:42:20 pm
Interesting example. Aici can't handle this yet. I'll work on this after the verbs are working.
I would consider this to be a substitution problem: when you say 'I have hands', the 10 fingers should be replaced by 2 hands, which can then in turn point to the fingers (what a strange sentence  :D)
The problem here is: when do you replace and when do you ask for more info. Let me illustrate with another example that broadens the scope a bit:
I have 8 tiers
a car has 4 tiers
i have cars

I can easily have some cars and some spare tiers somewhere. It's not so certain that, by 8 tiers, I meant those of the car. So it's probably better to ask some more info, like 'Are those 8 tiers the ones on the cars'.
That's where the 'components' from my original example can come back into play. In the 'how many hands to I have'  sequence, fingers and hands are both human bodyparts + the fingers are attached to the hands (a hand has 5 fingers), so, when both are encountered on a human, you can remove the fingers from the object without asking for more info. On the other hand, if one is the component of the other, it's probably best to ask if it can be replaced, otherwise, both relationships need to co-exist.
If you, or anyone else for that matter, know of any other examples that expose still other tricky bits, I'd love to hear about them.
Title: Re: NND & AICI
Post by: sunama on June 04, 2010, 03:50:10 pm
Right now, I am not so advanced in my AI, where I am asking it yet, to work out stuff (eg. I have 2 hands, Each hand has 5 fingers, how many fingers have I got in total?).

Right now, I am concentrating on getting my AI to retrieve data. Once I have this reliably complete, then I shall move onto calculations.

I can give you plenty of examples involving calculations, but just not yet. When I come to carry out those calculations in my own AI, then I will post them up here and ask you to input those questions into your AI, and check the result.

Right now, my AI doesnt classify each single word as a verb, adjective, noun, etc as I feel this is a bit superfluous. This would require immense memory/hard disk/cpu power HOWEVER, it is something I will definitely be looking in to and seeing if by classifying each word in the way you have, will bring any extra functionality.

Right now, even without classifying each word (as you seem to be doing), I am able to get decent output and like I stated before, my AI will be able to answer the questions posted earlier.

It may be difficult, when my AI comes to answer the question:

I have 8 tiers
a car has 4 tiers
i have cars.
How many cars do I have?

...however, I am confident I will be able to get the correct answer from the above input.

I think the main reason why I am able to get these answers without massive changes to the program is because the underlying principles of my program are a lot more basic and simple.

From what I can see your program is either VERY VERY complicated or your explanation is making a simple program sound very complicated. Note: I am not criticising your explanations, as you don't have to explain anything to anybody on these forums...you are doing it as a favour to the forum readers. Of course, when it comes to getting funding, you will definitely have to be able to explain your product, quickly and without confusing the listener.
Title: Re: NND & AICI
Post by: Bragi on June 04, 2010, 04:34:54 pm
Quote
Right now, I am concentrating on getting my AI to retrieve data. Once I have this reliably complete, then I shall move onto calculations.
Ok, I understand.

Quote
Right now, my AI doesnt classify each single word as a verb, adjective, noun, etc as I feel this is a bit superfluous.
How are you handling multiple 'meanings' of a word? For instance, 'mail' can be a verb or 'noun' and when noun, it can mean multiple things. There are very few english words that only have 1 meaning (even 'be' has multiple). I don't only classify in noun, verb,.. I classify for each single possible meaning.

Quote
This would require immense memory/hard disk/cpu power
This is true, might I suggest to keep an eye on this since it is the determining design factor of the core. It's not like you can keep all your data in memory and existing (relational?) database systems tend to be far to slow.
Title: Re: NND & AICI
Post by: sunama on June 04, 2010, 05:51:01 pm
Multiple meanings of a word are not a problem. My AI doesnt try or attempt to understand a word. It only looks for patterns. Thats all.

It works using key words. Once it has constructed a sentence using key words, it then looks for previous input (ie something which the user has previously input, or it has read on the internet) and then constructs a sentence by putting in words between the key words. In this way, the sentence is constructed without the AI actually understand what it has written.

So, for example:

Question: What colour are my eyes
AI's preliminary answer: eyes,,green (my AI already does this)
AI now use word combination patterns to turn the key words into a proper sentence
AI's final answer: [Your] eyes [are] green.

My belief is that the above method will give similar output to what your AI will give, only it will use far less resources and give answers quicker.

The only problem is that if my AI is asked a complicated question such as, "What is the meaning of life." it will struggle. Your AI on the other hand, may well give a decent answer.

Using the above technique, my AI never needs to understand what it is outputting, just that the format/pattern of words which it is using is correct. It knows that it is correct, because that same pattern of words has been used before, by the user or on the internet.

By breaking down the English language and defining each and every word, your AI is definitely more advanced, however, my gut feeling is that my AI shall be able to give similar output to your's, using fewer resources. But only time will tell.

If I feel that my AI needs to break down the English language (in a similar way to yours), then I shall have to add extra code to allow for this. At this point in time though, I don't want to go down that route, due to the sheer amount of code which will be required and the extra memory/hard disk space the program will use.

Note: I'm not saying that your AI is bad in anyway. If I had 2 years to play with, I think I would take the route you have taken, but I want to produce my AI as fast as possible, which is why I want to use different method. For commercial reasons, the faster the program can be produced, the better.

Another point is that my AI already uses multiple algorithms to come up with answers to questions. I think your AI must also have this ability. In otherwords, if it comes up with an answer using your default algorithm, your AI should analyse that answer to see if it makes sense. If not, it can then use a different algorithm and see if a better answer can be found. I'm not sure if your AI incorporates this way of thinking, but it might be something you could look into.

I shall definitely keep an eye on this thread and we can definitely compare answers (ie. of what eachother's program gives, as an answer).
Title: Re: NND & AICI
Post by: sunama on June 04, 2010, 06:03:42 pm
It's not like you can keep all your data in memory and existing (relational?) database systems tend to be far to slow.

What I'm doing is "caching" data in memory.

So, in some instances, I am repeatedly accessing a file on a hard disk. If the current code block is repeatedly accessing a particular file, then I load the entire file into memory and cache it. So, when the program needs information, rather than going back to the hard disk file, it simply reads it from the cached file, in memory. MUCH FASTER.

I also want to develop a technique, where my program can predict which files it will need. Once this is done, AI will load into memory the contents of the file, before it is required, thus improving its speed.

Caching is definitely the way to go, I think.
Title: Re: NND & AICI
Post by: Art on June 05, 2010, 12:36:41 pm

With all due respect a car doesn't have tiers...it has TIRES.

A TIER is a level or layer while a TIRE is a round, rubber, inflatable
device for an auto.

Spelling is very important when constructing and training a bot.
While there are many words that sound alike and some that are
spelled the same but have different meanings it is difficult to
"teach" that information to a bot.

Good luck with that.

Title: Re: NND & AICI
Post by: Bragi on June 05, 2010, 01:19:15 pm
Quote
With all due respect a car doesn't have tiers...it has TIRES.
My bad, spelling clearly has never been my major strength. I am not very good at it in Dutch, which is my native tongue, nor am I any good at it in English. I am even worse in French and German, but if needs be, I'll manage. How well do you spell in other languages?

Quote
While there are many words that sound alike and some that are
spelled the same but have different meanings it is difficult to
"teach" that information to a bot.

Good luck with that.
Other people's bots I have come across indeed don't appear to be able to handle this very well. Please note, this is not some future feature I would like to build in. This was one of the core design issues. AICI can already  do this, so thanks for the luck, but not needed  ;D.
Bugger, I had a nice example of 'be a be', but that's not right, it's 'be a bee'. If you know a simple example of 2 words using the same spelling, let me know, cause my mind is currently blank.

Title: Re: NND & AICI
Post by: Bragi on June 05, 2010, 01:30:02 pm
got it, let me make a small demo with 'mail' as in :
send a mail to x or print mail and  mail x or something similar.

or what about this:

I am blue -> feel down
my eyes are blue -> color.

This last example is already possible since no special verb.
Title: Re: NND & AICI
Post by: sunama on June 05, 2010, 01:55:49 pm
got it, let me make a small demo with 'mail' as in :
send a mail to x or print mail and  mail x or something similar.

or what about this:

I am blue -> feel down
my eyes are blue -> color.

This last example is already possible since no special verb.

I think that to deal with "special cases", the AI will have to be given a "special case" file, which it searches through to look for input which contains any such special case.

Bear in mind that cases such as "I am blue" are very rare. Most people would simply say, "I feel sad" or similar.

My belief is that the AI must be able to process correctly 50% of all cases. Once we have this, then extra modules will need to written for the "special cases". In this way, with every future release, the figure of 50% will rise and move towards 100%.

I don't believe that you can achieve 100%, without writing code for the special cases.
Title: Re: NND & AICI
Post by: Bragi on June 05, 2010, 02:04:29 pm
Give me a few days to show some results.
Title: Re: NND & AICI
Post by: lrh9 on June 05, 2010, 05:05:43 pm
Still interested in this, but I'm sorry I have not had much time to learn about it.

Seems like a dam has broken and I've been getting new ideas for code that I've wanted to try out.

Doing some coding today. I might have an alpha release of the agent tools ready.

I'll take a break after I've completed the alpha and take a deeper look at this.

(The break is well placed, because I'm going to have to do some tests and then refine the design and code to make it developer and user friendly. The result of refactoring design and code is joy. The effort is hell. Hopefully I won't be too embarrassed by what I have so far and will upload the source here.)
Title: Re: NND & AICI
Post by: Bragi on June 05, 2010, 06:44:22 pm
Quote
The break is well placed
Are you a student? and if so, what courses are you taking?
Title: Re: NND & AICI
Post by: lrh9 on June 05, 2010, 09:03:46 pm
I'm not a student.
Title: Re: NND & AICI
Post by: sunama on June 05, 2010, 09:20:03 pm
I'm not a student.

"Then what are you...A lost tourist?"

 ;D

I couldn't resist.  8)
Title: Re: NND & AICI
Post by: Art on June 06, 2010, 07:27:28 pm
Tourist... :D

@Bragi
Two words w/ same spelling...but pronounced differently...
There's :

Wind = air blowing / Wind = to encircle an object with string or to wind a mantle clock with a key.
Record = a vinyl disk containing music / Record = to make a permanent copy of ones writing, music, notes, etc.
Wound = a bodily injury to the skin and surrounding tissue / Wound = that which is or has been wrapped around another object.
Tear = a drop of saline from the corner of one's eye / Tear = to rip apart  a piece of paper.
Lead = a heavy metallic element / Lead = the guiding or directing of one or more individuals.
Read = To eyefully digest printer matter (my definition) / Read = a book or printer matter one has already seen and visually digested. Rhymes with RED.

There are many more as only these came to mind without resorting to a thesaurus.  I still contend that the real difficulty is getting the computer program to KNOW what a word is and then it's usage. A computer will never know what blue is other than a measure of visible light with a specific frequency on the spectrum and perhaps how it compares to other visible lights, etc. How it is used is another issue altogether. How difficult would it be to teach a computer to create poetry with all the nuances. Not just the simple moon, june, spoon words but using more diversity and even some near rhymes (except for silver, month and orange).

Let's face it, computers presently rely on recalling a series of words or phrases that are available to them instead of applying any knowledge of the word's actual meaning. More things to think on....

And a little luck was offered in good faith. If you don't need it...be that way.... ;)

Title: Re: NND & AICI
Post by: sunama on June 06, 2010, 07:53:25 pm
Strictly speaking, a lot of the posts in this thread should be posted in an "AI Concepts" thread. That way other people who developing their own AIs will be able to pick up some information that might prove useful to their own program, especially when it comes to testing.

I've copied 'the words which are pronounced the same', in the post above mine, in order to test my own AI, when I get to that point.
Title: Re: NND & AICI
Post by: Bragi on June 07, 2010, 02:50:26 pm
Thanks for the examples Art. I had just started working round 'blue'. Stay tuned.
Title: Re: NND & AICI
Post by: Art on June 07, 2010, 10:29:17 pm
Another of the problems would be words that sound the same when pronounced but have different meanings depending upon the context with which they were meant or given.

Such would be your blue = color and a feeling of sadness.
hose = a rubber or vinyl tube for delivering water or air or my computer got hosed with a virus
rub = a mixture of dry seasoning to add spice to various meats or rub a muscle when you get a leg cramp.
lime = color and a fruit as with lemon, orange, tangerine and avocado...etc.

There are simply so many words that fall into so many categories that it is one reason so many AI enthusiasts have a difficult time instructing the bot how to parse / handle words like these. Also how difficult it is for the bot to try to understand the context in which a word was meant.
Title: Re: NND & AICI
Post by: Freddy on June 07, 2010, 10:42:11 pm
Interesting, there's also lime the building material and lime trees.  Must be hundreds of these.

Disambiguation !
Title: Re: NND & AICI
Post by: lrh9 on June 07, 2010, 10:57:17 pm
But how do we know which is which? Is context processing really that difficult? Or has someone not given proper consideration and time to the problem?

I don't know. But I do know that sometimes it depends on further interaction. I've got to be honest. If you were cooking meat and asked me to go buy the rub I'd have to ask you what the hell you were talking about.  ;D
Title: Re: NND & AICI
Post by: sunama on June 07, 2010, 11:10:25 pm
I've got to be honest. If you were cooking meat and asked me to go buy the rub I'd have to ask you what the hell you were talking about.  ;D

LOL. My thoughts exactly.
Title: Re: NND & AICI
Post by: Bragi on June 08, 2010, 04:37:15 pm
Art, were you thinking of something like this:
(https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fjanbogaerts.name%2Fwp-content%2Fuploads%2F2010%2F06%2Fimage2.png&hash=cbe521421b7aff115d69e5553224e45e0f8ab9e9)
Notice I got the verbs working, near the end  ;D


I think I'm going to work on the 'copy' example now, as in:
Quote
copy 'x' to 'y'
delete the copy
It's a bit similar to Art's 'record' example, but a bit closer to the pc world ;)
This has some nice new challenges I haven't fully implemented or tested yet, like parsing file paths and the link back to .net: actually copying and deleting files.
Title: Re: NND & AICI
Post by: TrueAndroids on June 08, 2010, 05:24:40 pm
(https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fjanbogaerts.name%2Fwp-content%2Fuploads%2F2010%2F06%2Fimage2.png&hash=cbe521421b7aff115d69e5553224e45e0f8ab9e9)

very nice Bragi. That's enough evidence to say your AICI program is indeed thinking, and therefore an AI. If we use the networkdictionary.com definition of AI:

Artificial Intelligence (AI) - "can be seen as an attempt to model aspects of Human Thought on computers." From : www.networkdictionary.com

The thoughts here are classifying thoughts (genus / species). In your example, color(white, blue, red) and feeling(blue, happy). The thought answers the question "What <genus> is/are me/you?" And the thought is "I/you are <species>". And a question thought is also used to get the external information: "What is <species>?" And then a definitional thought is understood: "Species is genus." Keeping to this genus/species arrangement, this should be open-ended expandable. The user could then teach any genus/species arrangement and the AICI answer any g/s query (it has thoughts on).

** I also agree that this thread would be a good addition to the Concepts section Freddy!  ;D
Title: Re: NND & AICI
Post by: Bragi on June 08, 2010, 05:46:46 pm
Thanks TrueAndroids. Think about this for a second: I'm just getting started, these are the easy bits. :) :D ;D
Title: Re: NND & AICI
Post by: sunama on June 08, 2010, 11:50:27 pm
Those are good answers which your AI is coming back with. Very good.
Title: Re: NND & AICI
Post by: sunama on June 09, 2010, 01:52:35 am
Art, were you thinking of something like this:
(https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fjanbogaerts.name%2Fwp-content%2Fuploads%2F2010%2F06%2Fimage2.png&hash=cbe521421b7aff115d69e5553224e45e0f8ab9e9)


Q1. What sort of duration is taking for you to get your AI to reply to your questions? Less than 1 second?
Can you give us some idea please?

Q2. Also, is your AI written in Prolog?

Q3. Can your AI relate words yet, in the follow sense:

user: my eyes are green.
user: what colour are my eyes?

Can you AI relate that green is a colour?
Title: Re: NND & AICI
Post by: TrueAndroids on June 09, 2010, 02:16:34 am
Art, were you thinking of something like this:
(https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fjanbogaerts.name%2Fwp-content%2Fuploads%2F2010%2F06%2Fimage2.png&hash=cbe521421b7aff115d69e5553224e45e0f8ab9e9)


Q3. Can your AI relate words yet, in the follow sense:

user: my eyes are green.
user: what colour are my eyes?

Can you AI relate that green is a colour?

ANS>Q3 user: my eyes are green.
(*AICI either understands green from prior input, or asks PC:"what do green mean?" and user answers user: "That is a color."
User: What color are my eyes?
PC: Your eyes are green. (: as learned from prior, received external (user) knowledge as shown:)

Can you AI relate that green is a colour?

We see the AICI program do:
PC "What do red mean?"
User: "That {red} is a color."

So it could do the equivalent -
PC "What do green mean?"
User: "That {green} is a color."

**fixed somewhat, from below.
Title: Re: NND & AICI
Post by: Bragi on June 09, 2010, 08:21:20 am
Yep, TrueAndroids is getting it. If 'green' was known, it would simply store the data. If 'green' was unknown, it would ask what it is.
1 difference, to request for the info again, You'd have to ask, what color are my eyes.
Title: Re: NND & AICI
Post by: TrueAndroids on June 09, 2010, 08:50:34 am
Yep, TrueAndroids is getting it. If 'green' was known, it would simply store the data. If 'green' was unknown, it would ask what it is.
1 difference, to request for the info again,

You'd have to ask, what color are my eyes.

Ok I see, so generically it is "what <genus> is/are/am <object> (eg my color, my eyes)" (*where the correct answer is the assigned species by another thought)

Example: user: What mood (=feeling) is the boss in? PC:Blue.

Title: Re: NND & AICI
Post by: Bragi on June 09, 2010, 09:29:44 am
Yep, except it's fairly flexible in the word sequence (it parses it, a bit like a file path). You could also say something like:
My sister's color is blue or the brother of your wife is red
Title: Re: NND & AICI
Post by: Bragi on June 09, 2010, 09:48:14 am
Quote
Also, is your AI written in Prolog?
No, AICI is made with my neural network designer. The neural network designer is a WPF app, the core is currently C#.

Quote
Q1. What sort of duration is taking for you to get your AI to reply to your questions? Less than 1 second?
Can you give us some idea please?
This depends greatly on the complexity of the sentence, the number of  filters/shortcuts I have been able to add and the hardware it is running on.
In the example I gave, every sentence ran within expectable limits. But it's currently very easy to make it run very long. Without filters, the examples I wrote, would produce +- 400-500 threads per statement. Only 1 of those will produce a result. The system is based on uncertainty, so it tries many different paths. The more paths you can eliminate before they have to run, the faster it goes on current hardware (most statements in the example only use about 35-135 threads). If you would have a processor that could execute 500 threads at the same time, you would get a result close to the single thread. But with only 2 cores (as I have), each thread needs to be executed in sequence.
Secondly, the core is just a proto type. So it's not really optimized. To give you an idea: each instruction/expression is currently still interpreted (read,parsed,executed) every time it is executed. Add to this the fact that a few instructions are executed in a very, very long loop, you can hopefully understand the possibilities in this area still.
One final note: If it ever were to get as far as to have a system that can handle video, audio and sensory data at the same time, new hardware would be required, I think.
Title: Re: NND & AICI
Post by: Art on June 09, 2010, 10:55:38 am
Speaking of colors (or colours)...

A person can be GREEN with envy...
so sad that they're BLUE or
so angry, they're seeing RED or
so happy they're tickled PINK or
so afraid to try something they're YELLOW.

So you see...colors can exceed the limits of a crayon box....;)


OK... don't  get me started on the or, oar / to, two, too / Won, one / tri, try / rite, right types of words.... :D
Title: Re: NND & AICI
Post by: Bragi on June 09, 2010, 01:07:06 pm
Art, how is your green or blue any different from what I am doing? Did you read the full conversation? Didn't you notice that I switched from 'pure' colours (for the English) to emotions without a problem for the system. A 'reason' like you are giving, is simply some extra information that is stored. You are simply associating verbs with an emotion and color. No biggy.
As a side note: What you don't see for instance, in the conversation log, is that the system knows 3 'blues': 2 adjectives (the color and the emotion) and 1 noun (the color). It is perfectly able to pick the correct adjective .

'The' and 'a' are indeed some of the more tricky words since they can relate to a general thing or imply that more relationships are possible (for 'a'), it can refer to something in the previous statements but also something in the future ones (for 'the'), more searching is required for this.  The system doesn't yet have perfect algorithm's for these (Up untill now, I have only spend like a day or so programming on these words), so improvements will follow.

Art, when I read your comments, I get the distinct impression that you are still thinking in terms of what a 'Lisa'/'Alice' like chatbot can do: word matching, simple lookups, some variables and predefined answers. Perhaps you should take a serious look at my website, read up a bit on how it works, try to do a debug run for yourself. Perhaps also take a look at the various thesauri that are available in the designer.
Title: Re: NND & AICI
Post by: DaveMorton on June 09, 2010, 01:10:51 pm
Speaking of colors (or colours)...

A person can be GREEN with envy...
so sad that they're BLUE or
so angry, they're seeing RED or
so happy they're tickled PINK or
so afraid to try something they're YELLOW.

So you see...colors can exceed the limits of a crayon box....;)


OK... don't  get me started on the or, oar / to, two, too / Won, one / tri, try / rite, right types of words.... :D

I'll have to agree with that last part. Humans have enough trouble as it is with that:

"You had better just give me one slice of pizza. I'm too full to eat two." (https://aidreams.co.uk/forum/proxy.php?request=http%3A%2F%2Fwww.geekcavecreations.com%2Fimages%2FbigGrin.gif&hash=a5ee62c3c0165a5717f3fecdadffe58d316f837a)
Title: Re: NND & AICI
Post by: Freddy on June 09, 2010, 02:08:29 pm
TrueAndroids said :

Quote
** I also agree that this thread would be a good addition to the Concepts section Freddy!

Yes but it also makes a good thread here too as it is mostly about Bragi's project.  It's pretty much impossible to split up a thread like this and put parts in one place and parts in others.

The best I can suggest is that folks remember this thread was primarily about Bragi's project but that some concept discussion is bound to come up.  My suggestion is perhaps to drop a few place holder threads in the concept discussion board - you could always link to this thread for the areas that are related.
Title: Re: NND & AICI
Post by: sunama on June 09, 2010, 05:14:38 pm
Bragi, to get those answers to your questions, you posted earlier, on your hardware, what duration/timespan are you seeing?
Title: Re: NND & AICI
Post by: Bragi on June 09, 2010, 05:32:55 pm
A very rough estimate, with the client (not the designer), I get round: less then 1, to more than 2 seconds per statement. Generally, the network responds a bit faster than what you would expect from a human. If you enter a longer sentence that it doesn't understand, it can take up to 15 seconds before it comes back with 'confusion confusion!'
Title: Re: NND & AICI
Post by: TrueAndroids on June 09, 2010, 06:00:21 pm
I see what you mean now Freddy; it is a 'general discussion' about Bragi's project so it's in the right place. Good suggestions too.
Title: Re: NND & AICI
Post by: Bragi on July 30, 2010, 12:32:06 pm
Hello everyone,
I just made a new release of the designer and AICI. It took a little longer than expected, but the stuff that needed to work is working:
-you can now call .net functions from within a network. As example, I've implemented the File.Copy function. At the moment, you need to extract function arguments from the input statement for each function separately. I plan to make this more general in the future though.
-I've done some overloading on the statement 'hello', which should be a nice example.
-many bugfixes all over the place.
-... for more details on what's new, see here (http://janbogaerts.name/index.php/2010/07/29/nnd-0-5/).
Title: Re: NND & AICI
Post by: sunama on July 30, 2010, 07:14:43 pm


I am still developing my own language processing algorithms, however, I am following your project very closely.

I may even propose licensing your algorithm/program from you and incorporating into my own program, before I try and get funding next Summer.

However, is it at all possible for you to explain your project in simplistic terms?

Every update you do makes your system sound so unbeleivably complicated, I often wonder if it really is that complicated or is it simply the language you are using.

A good example is your mention of File.Copy. This is a very simple function ot use in .NET, however, at this stage, I have no idea what you mean by, "you can now call .net functions from within a network. As example, I've implemented the File.Copy function".

At some point you are going to have to sell your ideas to people and although I am programming my own project in .NET (and use .NET everyday), I am struggling to understand how your program (at a basic level) works. I would very much appreciate it if you could explain your project in laymen's terms, for not only me, but also future investors (assuming you would like to turn this into a commercial venture) to follow.

What really helps are screen shots of your designer. A few of those will help us understand your work even better. I have seen the sandbox screenshots, but more screen shots will be greatly appreciated.

Even on my own website (http://www.aiproject.50webs.com/screenshots.html), I have started adding screen shots of my Server/Client system, to give people an idea of what it is that my program actually does, as well as some sample input/output. The more screen shots, the better people will understand what you are producing.

Of course, its your choice how wish to proceed, but I would very much appreciate more screen shots and simpler language. I am VERY interested in your work.
Title: Re: NND & AICI
Post by: Bragi on July 31, 2010, 11:34:54 am
You probably have a point in that I am not the most ideal person to currently explain this in simple laymen's terms as I have been in the middle of this for a long time now. It's hard for me to make a difference between the entry level and advanced stuff.
When I mentioned the 'File.Copy' operation, I was actually referencing to a previous post (http://janbogaerts.name/index.php/2010/07/11/aici-calling-net/), which shows how to make Aici copy files (a link would probably have helped). I haven't gone into the details on how I am actually doing this, since it will still change a bit in the future, so I figured it best not to explain to much so it wont be too  confusing in the future. I only wanted to let people know that it is possible to execute static .net functions.
Have you already taken a look at the white paper (http://www.janbogaerts.name/Files/a_new_neural_network.pdf)? It's still a draft and needs a bit of rework, but it does explain the core concepts. Another version, but different wording, perhaps a bit better, can be found in the help file of the designer.
The usage of the designer is actually explained in some of the older posts and a bit in the designer. There are links provided from within the help menu of the designer. These are:
http://janbogaerts.name/index.php/2009/03/09/nnd-getting-your-feet-wet/ (http://janbogaerts.name/index.php/2009/03/09/nnd-getting-your-feet-wet/)
http://janbogaerts.name/index.php/2009/03/17/about-sandboxes/ (http://janbogaerts.name/index.php/2009/03/17/about-sandboxes/)
http://janbogaerts.name/index.php/2009/03/31/update-floweditor/ (http://janbogaerts.name/index.php/2009/03/31/update-floweditor/)
http://janbogaerts.name/index.php/2009/04/05/update-flow-editor-take-2/ (http://janbogaerts.name/index.php/2009/04/05/update-flow-editor-take-2/)
http://janbogaerts.name/index.php/2009/06/05/designing-code-editing-techniques/ (http://janbogaerts.name/index.php/2009/06/05/designing-code-editing-techniques/)
http://janbogaerts.name/index.php/2009/06/05/designing-code-statements/ (http://janbogaerts.name/index.php/2009/06/05/designing-code-statements/)
http://janbogaerts.name/index.php/2009/06/05/designing-code-tips-and-tricks/ (http://janbogaerts.name/index.php/2009/06/05/designing-code-tips-and-tricks/)
http://janbogaerts.name/index.php/2009/06/09/the-debugger/ (http://janbogaerts.name/index.php/2009/06/09/the-debugger/)
http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/ (http://janbogaerts.name/index.php/2010/03/04/debugging-networks-split-paths/)
I will probably make these links more accessible from the website as well. It's a blog at the moment, so stuff is a bit scattered all over the place. If something is not clear, or you don't understand something, you can always ask.
Title: Re: NND & AICI
Post by: Bragi on July 31, 2010, 04:04:00 pm
I've updated the Key concepts (http://janbogaerts.name/index.php/key-concepts/) page a bit. I think this is about as short as I can write the basic principles down.
Title: Re: NND & AICI
Post by: sunama on August 01, 2010, 10:03:10 am
I have read the white paper. Some of the content has gone over my head (but this is not your fault - I'm not well versed in neural networks).

I have the jist of what it is that your program will aim to achieve. I think you stated that English is not your first language, so this could be a reason why some of your sentences are proving difficult to understand. At this stage though, this isnt a problem. obviously when if/when you choose to go commercial with this and you need to explain your ideas to others, you will definitely need to change the wording.

Anyway...

In a nutshell, I think your basic process can be summarised thus:

your program receives input (text, audio, image, etc).
it then prepares to process the input
the input is "split" and sent to different processors
many different processors are now acting concurrently, on the information received
each processor runs in its own thread
each processor will then come up with its best response.
if no answer can be found, the processor "dies"
if an answer can be found, the processor returns its response to your (main) program
after all responses from the processors have been received, your program decides which response to deliver to the user

The name of your (main) program is called "designer" or "n2d" (I'm still not 100% sure about this).

Is the above correct?

Now, also, at present, if I gave the following input:
My name is Abu.
What is my name?


How many threads (approximately), will be used to derive a response to the 2nd line of input?


In your white paper you state that current CPUs dont have enough cores to run the program optimally. My own program is currently using about 10 threads, to come up with responses, though as my program develops this will increase substantialy. At present, I have not encountered any problems with regards to performance, which I havent been able to solve.

I actually contend that modern hardware is good enough to handle multithreaded programs.

What sort of hardware are you developing your program on?
Title: Re: NND & AICI
Post by: Bragi on August 01, 2010, 02:33:52 pm
-Yes, English is not my main language.
-Your almost there: I don't split the input to be handled by multiple processors. Initially, all input always starts on 1 processor: it's the processor itself that splits into multiple instances, all of them identical to the first, but with 1 small difference in each. For instance, if a processor wants to transform the word 'call' into it's part of speech and finds 2 possibilities (that can not yet be reduced to 1), the processor will perform a split, so both possibilities can be tried.
 It's exactly this trick which is not possible on current hardware (no X86 instruction to perform this, impossible to do a set up  of a single core correctly, using any kind of X86 instruction combination). To solve this, I had to make a virtualization of a processor design that is able to do this. Basically, I made something similar to VMWare, but not for an X86 but something new. This works, but there is an enormous performance penalty for this trick (and others, required to handle multi threading issues that would better be done in hardware).   That's why I made the statement about new hardware design.
To put it differently: all current hardware processors are based on the Von Neumann (http://en.wikipedia.org/wiki/Von_Neumann_architecture) principle. My virtualization isn't.
-Let me do some tests about the nr of  threads Aici is currently using for your examples (it varies).
Title: Re: NND & AICI
Post by: sunama on August 01, 2010, 03:11:26 pm
Initially, all input always starts on 1 processor: it's the processor itself that splits into multiple instances, all of them identical to the first, but with 1 small difference in each. For instance, if a processor wants to transform the word 'call' into it's part of speech and finds 2 possibilities (that can not yet be reduced to 1), the processor will perform a split, so both possibilities can be tried.
It's exactly this trick which is not possible on current hardware (no X86 instruction to perform this, impossible to do a set up  of a single core correctly, using any kind of X86 instruction combination).

Right. Is it not possible for your to have 1 processor, in the first instance, analyse the input.
It then decides that there are 2 possible paths to take, to analyse the input.
It then decides to split the calculation.

At this point, is not possible for you simply to create 2 different threads, so that each thread concurrently, analyses the input.
After BOTH threads have completed their work, the output is displayed to the user?

Surely by using 2 (or more threads), you can achieve your aim of splitting up the analysis of the input data?
Title: Re: NND & AICI
Post by: Bragi on August 01, 2010, 03:57:41 pm
Quote
Surely by using 2 (or more threads), you can achieve your aim of splitting up the analysis of the input data?
In short: No.  Why: the analysis of 1 input string isn't split over multiple processors, the string is analysed in multiple different ways. When we begin, we don't know in how many different ways the analysis needs to be done.

Quote
It then decides to split the calculation.
The calculation isn't split. A single processor still needs to process the entire sentence.  It is not so that I divide the workload to put the final result back together, 1 processor calculates the entire result on his own.

I know that, what you are trying to describe, is how people like to think about how multiple cores should be used: you have 1 data-packet that needs to be processed, so we split the process into multiple parts and assign each part to a thread. This is not how I am doing things. Every result for the data-packet will always be analysed in it's entirety by a single processor. It's just that I don't do 1 analysis process, but many, and it is impossible to determine upfront how many that will be or even how they will differ from each other. I am using multiple cores to resolve ambiguity, not to make things go faster.
Furthermore, a thread doesn't correspond to what I call a 'processor'. In fact, over the coarse of a processor's life time, it might run in several different threads, though always 1 concurrently.
I suspect that part of your confusion comes from the fact that I use words like 'processor' instead of thread. I do this, as not to confuse the 2, since they are not the same.

Title: Re: NND & AICI
Post by: Bragi on August 01, 2010, 04:19:54 pm
Quote
Now, also, at present, if I gave the following input:
My name is Abu.
What is my name?
How many threads (approximately), will be used to derive a response to the 2nd line of input?

My name is Abu: 90 threads
What is my name: 47 threads

A total of 135 threads.

If I were to remove all the filters (they perform look-aheads/look-backs to reduce the nr of splits) on the flows, it would be a lot more, something like 300-500 threads for each statement. For more complex sentences, this can easily go up to 5000+ (without filters).
Title: Re: NND & AICI
Post by: sunama on October 25, 2010, 08:11:17 pm
Bragi...just wondering how your program is coming along?
Title: Re: NND & AICI
Post by: Bragi on October 26, 2010, 01:22:40 pm
Hi, Sunama,
Thanks for asking. Ye, I guess I lost track of time a little. I've been busy as a bee, working on the next release. You probably beat me by a week or so.
Anyway, lots of stuff has changed, both in Aici and the designer. I've mostly focused myself on improving current stuff (no new tricks like counting). I've added 2 new stages to Aici: one to do a grammatical analysis of the possible results (used for things like making a distinction between 'a' as an article/determiner or as a noun, like the letter). The other stage is for semantical processing. Where I previously only did a simple convertion, I now have a complete stage that allows me to do further filtering, based on semantics. Though this needs further work (I'm currently doing the analysis in fixed order, which needs to be changed I think in a variable one). I've also changed the final output stage into something more elaborate  with 3 sub-stages to simulate conversation techniques (you know: acknowledge what was said, state your own opinion about what was said, formulate a new question. If only I could do that). Unfortunately, I'm not yet making use of this last technique in the output rendering as it should. 
The time spend on the designer and core, mostly went into getting the 'prototype taste'  out of them. I did some memory and performance profiling, which has so far produced some impressive results. I've also managed to find a few very nasty threading bugs, but there's at least 1 more left.
And finally, I've also made a web-based version of Aici. I hadn't done any announcements on that one yet, cause it was still behaving funky at times, though this should be better now.
Pffjeuuwie. That was more than I imagined it to be in my head. Anyway, in a week, perhaps 2 I should be doing a new major release.
Title: Re: NND & AICI
Post by: sunama on October 26, 2010, 01:55:44 pm
Hi, Sunama,
Thanks for asking. Ye, I guess I lost track of time a little. I've been busy as a bee, working on the next release. You probably beat me by a week or so.
Anyway, lots of stuff has changed, both in Aici and the designer. I've mostly focused myself on improving current stuff (no new tricks like counting). I've added 2 new stages to Aici: one to do a grammatical analysis of the possible results (used for things like making a distinction between 'a' as an article/determiner or as a noun, like the letter). The other stage is for semantical processing. Where I previously only did a simple convertion, I now have a complete stage that allows me to do further filtering, based on semantics. Though this needs further work (I'm currently doing the analysis in fixed order, which needs to be changed I think in a variable one). I've also changed the final output stage into something more elaborate  with 3 sub-stages to simulate conversation techniques (you know: acknowledge what was said, state your own opinion about what was said, formulate a new question. If only I could do that). Unfortunately, I'm not yet making use of this last technique in the output rendering as it should. 
The time spend on the designer and core, mostly went into getting the 'prototype taste'  out of them. I did some memory and performance profiling, which has so far produced some impressive results. I've also managed to find a few very nasty threading bugs, but there's at least 1 more left.
And finally, I've also made a web-based version of Aici. I hadn't done any announcements on that one yet, cause it was still behaving funky at times, though this should be better now.
Pffjeuuwie. That was more than I imagined it to be in my head. Anyway, in a week, perhaps 2 I should be doing a new major release.


I'm interested in your web based application.
Is it up and running and hooked up? Can i try this out (without downloading anything)?
Title: Re: NND & AICI
Post by: Bragi on October 26, 2010, 02:05:49 pm
Yes it's currently accessible.Here's the link:
http://bragisoft.com/AiciClient/AiciWebTestPage.aspx (http://bragisoft.com/AiciClient/AiciWebTestPage.aspx)
It's a silverlight web app, so you might need the silverlight runtime support for your browser, if you don't have this already.
A few notes to mention though: the web version is a little dated. It doesn't have any of the performance profiling. This combined with the shared server it is running on == very slow. So you might need some patience. The system normally responds to all input with something, it just takes some time.
Also, Aici itself is a mid development version (I mostly wanted to get the web-part working), so it still fails a lot of the time.
Title: Re: NND & AICI
Post by: Bragi on November 01, 2010, 04:00:32 pm
As previously mentioned, a new release was imminent, so here we are. I've updated the designer, Aici Client and also the Aici-web (http://janbogaerts.name/index.php/2010/11/01/nnd-0-5-1/).
The next step will most likely be complex sentences. I need them to make the system more 'teachable'.
Title: Re: NND & AICI
Post by: sunama on November 01, 2010, 08:04:12 pm
As previously mentioned, a new release was imminent, so here we are. I've updated the designer, Aici Client and also the Aici-web (http://janbogaerts.name/index.php/2010/11/01/nnd-0-5-1/).
The next step will most likely be complex sentences. I need them to make the system more 'teachable'.

I've played around with your web chat.

Is it possible for you to "lock" the "send" button, while your AI is in the process of generating a reply?

This is what I have done in my own AI, so it avoids problems of asking questions, too quickly (ie. before the last question/information has been processed).

I can give you examples of where your AI has fallen apart, simply because the "send" button was active, while your AI was still in process of analysing the previous sentence. Deactivating the "send" button, while the AI is in the process of processing the last user input, will solve a lot of problems for you.
Title: Re: NND & AICI
Post by: Bragi on November 02, 2010, 01:09:22 pm
Hi Sunama,
Could you perhaps tell me what you did exactly? Cause I can't seem to find the log in which something goes wrong due to out of order processing. That said, I don't suppose it's hard with the web-based version to get such a behaviour at the moment. I am getting the type of time-outs that is suggesting me the server is over-used.
You are correct though, Aici currently doesn't have anything in place to make certain that the input order is preserved during execution (which it should).
Disabling the send button itself would perhaps be a bit to much. What would happen if there was no reply? It's parallel processing method makes it not so evident to keep track of which thread belongs to which input (though it is possible to add if really required). That together with the fact that multiple users can chat at the same time, makes it not so convenient to disable the send button during processing.
So,I'll probably have to keep track of input sequence in a similar way as what I am doing with multiple sentences in a single input statement. Thanks for letting me know!.
Title: Re: NND & AICI
Post by: Bragi on November 02, 2010, 02:57:33 pm
Quote
Could you perhaps tell me what you did exactly?
Never mind, I did a little try and I think I know what you saw.
Thanks for letting me know.
Title: Re: NND & AICI
Post by: sunama on November 02, 2010, 07:44:36 pm
Hi Sunama,
Could you perhaps tell me what you did exactly? Cause I can't seem to find the log in which something goes wrong due to out of order processing. That said, I don't suppose it's hard with the web-based version to get such a behaviour at the moment. I am getting the type of time-outs that is suggesting me the server is over-used.
You are correct though, Aici currently doesn't have anything in place to make certain that the input order is preserved during execution (which it should).
Disabling the send button itself would perhaps be a bit to much. What would happen if there was no reply? It's parallel processing method makes it not so evident to keep track of which thread belongs to which input (though it is possible to add if really required). That together with the fact that multiple users can chat at the same time, makes it not so convenient to disable the send button during processing.

In a nutshell, I said "my name is abu". (1)
The very next thing I typed was, "what is my name?" (2)

Your AI then replied that it doesnt know what my name is. (3)
I then wrote again, "my name is abu". (4)
"What is my name?" (5).

It then gave the correct answer.

Now, what was happening (and correct me if I'm wrong), is that your AI was able to answer the question correctly in both cases. BUT, it couldnt do so, when I typed in (2). This was because (1) was still being processed. After processing for (1) was completed, it could then answer my name.

Had you disabled the send message button (until (1) had been processed), it would've been able to answer my question (2).

The key here is to perhaps inform the user, somehow, that (1) is still being processed, so your AI cannot answer questions regarding the information provided in (1). The easiest method for this is to deactivate the send message button, until the AI has replied to (1).

If you allow multiple users to type information into AI, all at the same time, you are going to run into problems.
My suggestion is to first get your AI replying to input from 1 user. Once it has mastered this, you can then program it to answer queries from multiple users. Programs are best constructed when you build them step by step. Rather than building a program with an IQ of 1000, it is best to build the program with an IQ of 1. Then add to the code to enable its IQ to rise to 2. Then further add to the code, so it now has an IQ of 3 and so on.

The idea being that with every new version, your program is becoming increasingly advanced. Eventually, you will reach a point where your program has the "wow" factor and you can sell/market this for financial gain. This is the model which I am using.

"Disabling the send button itself would perhaps be a bit to much. What would happen if there was no reply?"
I'm using message numbers and response numbers.
What this means is that every client and server have a record of the amount of responses received/sent. They both have sync up. If 1 message is lost, a request is made to resend the last message.
I have set a time of 3s for the client to wait for a reply from the server. If no reply is received, the client resends the message to the server. When the server receives this message, if the message is new then it will store it and generate a reply. If it is message which has previously received, it will merely ignore it.

The above technique is what I have used in my own client.

Also, I am still very interested in licensing your AI.

I am developing my own AI and monitoring your development. My plan is to see what features your AI possesses and mine lacks. I shall then license only those features.

At present, my AI does not possess any algorithms which relate to "is a" and "has a", which I believe your AI already possesses. If your algorithm is working well for working out "is a" and "has a" relationships, then I may not bother wasting time on developing those algorithms for my AI. I shall license yours.

My worry is that your AI does seem very slow to generate answers. No doubt this is purely because your AI is much more complicated than mine. What hardware are you running your server (for the web chat) on?

Have you optimised your code for speed yet, at all? Is the current response generation time as fast as you are likely to get or do you feel that you will be able to make response generation faster?
Title: Re: NND & AICI
Post by: sunama on January 01, 2011, 01:38:04 am
Hi,

I just had a play around with your AI.

it was not able to process:

user: my eyes are green
user: what colour are my eyes?
AI: confusion!!!

It couldn't process this information.

Also Bragi, what  is  your email address?
I wish to discuss some stuff in private as my prototype shall be ready in Summer 2011 and I was thinking of perhaps licensing part of your program. My web ap is at http://www.aicore.co.uk/, however, I have not permanently hooked up the server yet.

One reservation I have is regarding the speed of response. I've noticed that in some instances, after informing nnd of my name, it needs approximately 5-10 seconds before it is able to assimilate this information. I'm just wondering if you are running the server at home or you are using your web host's processor.

Anyway, let me know what email addy I can contact you on.
Title: Re: NND & AICI
Post by: Bragi on January 01, 2011, 01:44:24 pm
So, the web version finally died he. I hadn't checked on it for a while. To my surprise, it lasted so long. The primary purpose of it's current incarnation was to see how long the database would remain running without getting to corrupted. I guess that point has come now.  I'll reset the db shortly so that it works again. This will be with the current 'public' version (no new stuff), cause the next one isn't ready yet.
Looks like it's website crashing time, al-round. My blog had been showing some serious 'issues' that finally made me decide to move the whole thing to another hosting company, which did not work out as planned, so my blog is also down for the moment  :-[  (fixing this now).

you can find my email address in my profile info (just click on my username, above the picture, to the left. Or, even faster, just click on the 'letter' image underneath the picture. You can also send me a private message, through this forum.
Title: Re: NND & AICI
Post by: Bragi on March 16, 2011, 03:52:30 pm
I just (well, on Monday) made a new release of all the software. Designer and client can be downloaded from my site.

Lots of new stuff, lots of fixes, but still lots of limitations. The basics of complex sentences are now supported, I've added better support for verbs (but only a few verbs are already known), 'be' and 'have' have been improved,...
There's still lots of stuff to do, things like 'a hand and a finger', adjectives are still not supported and compound words (like sail boat) are also not yet working correctly,....

Quote
user: my eyes are green
user: what colour are my eyes?
AI: confusion!!!

It couldn't process this information.
Sunama, it turned out there was still a bug in the prev version which made this fail (I missed it originally). Things like this should work now.

Title: Re: NND & AICI
Post by: sunama on March 16, 2011, 03:56:59 pm
Has your new version been uploaded into your (online) webclient?
Title: Re: NND & AICI
Post by: Bragi on March 16, 2011, 04:20:52 pm
Yep, should be.
Title: Re: NND & AICI
Post by: Bragi on March 19, 2011, 04:00:26 pm
I've been working on some screencasts to demo the designer. Here are the first 2:

http://www.youtube.com/watch?v=Sqr59YAoR_s&feature=player_embedded
http://www.youtube.com/watch?v=ATpIOQDlRIY&feature=player_embedded
Title: Re: NND & AICI
Post by: DaveMorton on March 19, 2011, 04:20:39 pm
(Privately, to Jan: Everyone else avert your eyes!) What software did you use to create those screencasts, Jan? (ok, everyone else can look now!)
Title: Re: NND & AICI
Post by: Bragi on March 19, 2011, 05:06:09 pm
I used HyperCam2 (http://www.hyperionics.com/) (free) to create the video stream and Windows live movie maker to add the captions, remove unwanted parts and time stretch others.
For the thesaurus demo, I first made a little script with all the actions I wanted to show (of course, I forgot a bunch), which I then followed during recording (that are most of the pauses during which the captions are shown: me reading the script  ;D )
Title: Re: NND & AICI
Post by: DaveMorton on March 19, 2011, 06:05:10 pm
Thanks, Jan. I've tried Fraps in the past, but was unsatisfied with the results.WMM is ok, if a little clunky, but it's usable. :) Maybe I'll try making a screencast or two on setting up a chatbot "from scratch", and post them, when I get the time.
Title: Re: NND & AICI
Post by: Bragi on March 19, 2011, 06:13:06 pm
Quote
WMM is ok, if a little clunky, but it's usable.
Yes, I was missing a little more control over timing, but for my purposes, and skill level, it's just fine.
Title: Re: NND & AICI
Post by: Freddy on March 21, 2011, 01:27:01 pm
Nice work Bragi, it's really impressive what you have done.  I just took a look at your blog and the bit about the 2008 CBC (http://janbogaerts.name/index.php/2011/03/10/cbc-08/) really caught my eye.  I really like the way you can teach it (can I say 'it' ?) and the way things are learned.  It seems like an engaging way to program something, ie with natural language.  In fact it seems more like teaching than programming.

Well done indeed, I only wish I understood half of it  O0
Title: Re: NND & AICI
Post by: Bragi on March 21, 2011, 02:26:03 pm
To tell you the truth, I sort of worked towards the 'easier' questions. It turned out 2008 was the 'easiest' year to get working sort of, so that's what I focused on.  Some of the other years would have been a catastrophe.

Quote
I really like the way you can teach it (can I say 'it' ?) and the way things are learned.
Oh it's an it, definitely, more like a string of tricks, so I'd label it more of a recording device, for the moment.

I'm putting some other screen casts together, to show how you can expand the network from the designer. In the next one, I show how to add support for sentences like 'a human has 2 hands' from within the designer. The next ones will show how to make sentences work like 'I object to the object' (the thesaurus video already shows how to add the verb) and also  'top of the morning to you'.
I think, by showing how it's done, a lot will become more clearer. For me as well, it was a matter of sorting out my mind. By getting ready for the cbc, I've gotten a bit better defining the network, but I still can't explain it very well, so maybe it's better to simply show.
Title: Re: NND & AICI
Post by: Bragi on March 21, 2011, 02:27:17 pm
By the way, the screen casts might take another couple of days, I'm taking it a bit slower the next week still (I'm also repainting the bathroom).
Title: Re: NND & AICI
Post by: sunama on April 26, 2011, 09:08:14 pm
Hi,

I just tried to teach your ai something:

obama is the president of usa.
Who is the president of usa?

Your ai was not able to generate the correct answer.
Is this something that you are working on?

I was able to teach it that green is a colour and blue is a colour. It learnt this very quickly.
It could not understand about the president of USA.
Title: Re: NND & AICI
Post by: victorshulist on April 26, 2011, 10:41:18 pm
Probably because it involves a prepositional phrase  ( "of the USA").

prepositional phrases are complex.   The main reason being determining their antecedent.

 In this case it is easy though "of the USA" could apply to either:

subject "Obama"
verb "is"
direct compliment of verb ("president")

If the bot doesn't have knowledge of world, then it won't know that USA is a country and that countries can have presidents, and thus won't know to determine the correct antecent of "of the USA" (which of course is "president")
Title: Re: NND & AICI
Post by: sunama on April 26, 2011, 11:45:32 pm
so, would the solution be:

usa is a country
usa has a president
the current president of usa is obama

would this work?
Title: Re: NND & AICI
Post by: Bragi on April 27, 2011, 06:54:35 am
Probably. It could be that USA was an unknown word.
I'm currently very buzzy on something. Can't say much yet. All will be clear in a couple of weeks I think. It will be interesting.   :D
Title: Re: NND & AICI
Post by: Bragi on April 27, 2011, 08:30:08 am
so, would the solution be:

usa is a country
usa has a president
the current president of usa is obama

would this work?
Try something like:
a president is a property.
usa is a country.
the president of the usa is Obama.
I think something like that should work.
Title: Re: NND & AICI
Post by: Freddy on May 23, 2012, 11:56:06 am
Was thinking, is it time for another demonstration of how well AICI chats ? I mean a chat log to show off what it can do...
Title: Re: NND & AICI
Post by: Bragi on May 23, 2012, 01:29:04 pm
Argg, had an whole reply typed out, only to loose it again. Here's a second attempt:

-I've just uploaded the android version of aici to the web: http://bragisoft.com/chat-online/ (http://bragisoft.com/chat-online/). It's still a very simple bot, it doesn't even yet have pattens to handle 'x is y' or the x of y is z'. They should be added before Steve's competition (http://www.chatbotbattles.com/) takes off. (some chatlog would probably be helpful for getting out some of the kinks)

About new tricks: you have sort of beaten me to the punch by a couple of days. I'm currently trying to get a first pattern learning algorithm to work. At the moment, it's still very simple: record a static input string and attach a static response to it. I'm hoping to get this working before the chatbot battles as a fallback, when it can't find a proper reply. In a next iteration, 'sub-topics' like subject, location, time,... should be recognized in new patterns,...

I'm actually trying to implement 2 things for the time of 1: the learning algorithm is written in a new front-end language which sits on top of the resonating neural network. This will become the new 'do-patterns' so that you have 'for, do, if,... + the rest of the network's features. It'll also give a better upgrade path for already existing networks (the pattern-matching algoritm can now be rendered and distributed as text). (and it should also allow me to document the code a bit better).

Here's the actual learning algorithm:
(it's currently still very much inked-into the already existing code, so things like 'callbackin' and 'callbackOut' are defined in another file and reference existing neurons.
Code
//callback for var-path
//builds a new input pattern, based on the last input statement found in the log
//The input pattern is added to a new rule (which is added to a special 'learned' topic.
//The rule is  linked to the CallbackIn, which is an output pattern.
//callbackOut will contain the newly created input pattern when done (single textneuron).
Cluster LearnPattern(code)
{
   this()
   {
      var iInputs = GetLastInputFromLog();
      int iCount = Count(iInputs);
      if(iCount > 0)
      {
         string iSpace = " ";
         CallbackOut = CCToS(Interleaf(ref(iInputs), ref(iSpace)));     //we need to convert the list of words back to a single sentence, where each word is seperated with spaces, so we have a visual representation for the pattern.
         var iCurrent = iInputs[0];
         AddLink(CallBackOut, iCurrent, ParsedPatternStart);
         for(int i = 1; i < iCount; i++)
         {
            var iNext = new(Neuron);
            AddLink(iCurrent, iNext, iInputs[i]);
            iCurrent = iNext;
         }
         AddLink(iCurrent, CallBackOut, Rule);
         var iRule = MakeCluster(Rule, CallbackOut);                    //add it to a new rule
         var iOutput = MakeCluster(OutputPatterns, CallbackIn);          //link the rule with the output.
         AddLink(iRule, iOutput, OutputPatterns);
         AddChild(AutoLearned, iRule);                               //add the rule to the default topic.
      }
   }
   
   GetLastInputFromLog(): var
   {
      var log = GetFirstOut(OutputSin, CurrentConversation);
      if(count(log) > 0 && ChildCount(log) > 2)
      {
         var iFound = ChildAt(log, ChildCount(log) - 3);
         return GetChildrenRange(iFound, 0, ChildCount(ifound) -1);     //each log item also contains a date-time stamp at the end, which has to be removed.
      }
   }
}

//callback for var-path
//builds an output pattern based on the content of CallbackIn and returns this (through CallbackOut).
Cluster BuildOutputPattern(code)
{
   this()
   {
      int iCount = Count(CallBackIn);
      if(iCount > 0)
      {
         CallbackOut = CCToS(CallBackIn);     //we need to convert the list of words back to a single sentence, to form the neuron that represents the pattern (also useful for the editors).
         var iParsedPattern = MakeCluster(ParsedPatternOutput, CallbackIn);
         AddLink(CallbackOut, iParsedPattern, ParsedPatternOutput);
      }
   }
}
Title: Re: NND & AICI
Post by: Bragi on May 31, 2012, 01:51:16 pm
As promised, here's a short example of Aici's latest learning trick:

Code
You: kiss kiss
bot: What should I reply to that?
You: kisses for you too
bot: Ok, I see. Ask the question again, see if I got it.
You: kiss kiss
bot: kisses for you too

This is done with a single rule. It's still very, very simple, but, it's working, and it's a start. The code example that I wrote in the previous post, turned out to be a little bit of an oversimplification, but not that much.
I think this is a personal record by the way: from design to a full fledged working (well, good enough to start producing simple demos) programming language and compiler in something of a month.
Anyway, I've uploaded this to aici -online (http://bragisoft.com/chat-online/), if you want to give this a try.

Also, Freddy, in the chatterbox collection, is Aici still in there? cause if it is, the link is probably broken.
Title: Re: NND & AICI
Post by: Freddy on May 31, 2012, 03:22:14 pm
Yes it's still there :)

http://www.chatterbotcollection.com/item_display.php?id=3045 (http://www.chatterbotcollection.com/item_display.php?id=3045)

We could do some work on that if you want.  The links do work, but I don't know if they point to where you want.
Title: Re: NND & AICI
Post by: Bragi on May 31, 2012, 04:17:18 pm
Yes, that's still for the deskop version. Perhaps this can point to the download page: http://bragisoft.com/download/ (http://bragisoft.com/download/)
There could maybe be an other entry for the online version:  http://bragisoft.com/chat-online/ (http://bragisoft.com/chat-online/)  ?

Also, I've done a small update (on the online version) to fix some last minute bugs.
Title: Re: NND & AICI
Post by: Freddy on June 03, 2012, 11:47:52 am
Yes I can change things.  Do you want to come up with some (longer) descriptions ?
Title: Re: NND & AICI
Post by: Bragi on June 03, 2012, 02:07:54 pm
Yep, the text is perhaps a little outdated. Let me think of something new...
Title: Re: NND & AICI
Post by: Freddy on June 14, 2012, 12:06:27 pm
Any joy with this ?

I have added the Bragisoft banner to the Chatterbot Collection too now  O0

Quote
Yes, that's still for the deskop version. Perhaps this can point to the download page: http://bragisoft.com/download/ (http://bragisoft.com/download/)

Done that, just waiting for a new description and details of the new link too.
Title: Re: NND & AICI
Post by: Bragi on June 14, 2012, 06:14:57 pm
I had completely forgotten about that. Give me another day or so, currently very busy getting the latest fixes in the online version for the competition.
Title: Re: NND & AICI
Post by: Freddy on June 14, 2012, 08:31:57 pm
OK no rush, just jogging your memory  :)
Title: Re: NND & AICI
Post by: Bragi on July 09, 2012, 02:32:50 pm
Well, the competition is over for me. Aici didn't get to the next round. No surprises there, it wasn't exactly 'ready' yet. The competition did turn out to be a great test-bed for the engine. I had pushed it a little in the area of thesaurus paths and sub-topics, which showed me some bottle-necks that still needed fixing. (well, actually lots of memory and performance profiling showed me) By the end of the first stage in the competition, I had fixed most of these (and others, including lots of new ones), so I did a new release this weekend and I also published lots of new topics (well 54 in total, some were already downloadable, but most have been updated). All can be downloaded from here (http://bragisoft.com/download/).

I've also managed to gather some new ideas during the competition for making the outputs more variable, so that the bot is able to produce unique responses, based on settings like 'introvert 70%, likes: dogs, films, hates:...), but still use patterns to declare everything, just in a general way, like 'subject verb object location time reason' or something similar. Should be great for creating a translation bot as well.
This is something I would like to work on next, but I need (want) to use the neural network language for this, so I first need to make certain that this works like it should (there are still some things I need to debug for this). I think this is going to be interesting.

Finally, I still need to come up with a new description. How about something like: Aici is an infant competition and show case bot for resonating neural networks. It's abilities and performance will be improved on as time goes by and experience has been gathered from competing against other bots.
Title: Re: NND & AICI
Post by: Freddy on July 10, 2012, 01:00:24 pm
Well even though you are out, like you say at least it allowed you to update some things and add new stuff, that's positive.

I think your description sounds fine too, where shall we put this ?
Title: Re: NND & AICI
Post by: Bragi on July 10, 2012, 02:09:35 pm
the description was for the chatterbot collection.
Title: Re: NND & AICI
Post by: Freddy on July 17, 2012, 12:56:05 pm
Sorry, was away for a couple of days, then had a few things to do.  So we have :

Quote
Aici is an infant competition and show case bot for resonating neural networks. It's abilities and performance will be improved on as time goes by and experience has been gathered from competing against other bots.

And this is for a new entry about the online version yes ?  Located here : http://bragisoft.com/chat-online/ (http://bragisoft.com/chat-online/)

Correct me if I am wrong :)
Title: Re: NND & AICI
Post by: Bragi on July 17, 2012, 01:16:18 pm
yep, that should be it.
Title: Re: NND & AICI
Post by: Freddy on July 17, 2012, 01:25:44 pm
Cool, here you go : http://www.chatterbotcollection.com/item_display.php?id=3129 (http://www.chatterbotcollection.com/item_display.php?id=3129)
Title: Re: NND & AICI
Post by: Bragi on July 17, 2012, 01:50:10 pm
 O0
Title: Re: NND & AICI
Post by: victorshulist on July 23, 2012, 09:00:28 pm
Good to know you are continuing work on your project.
Title: Re: NND & AICI
Post by: Bragi on July 24, 2012, 11:22:24 am
yep, I think it's about to enter an interesting phase.  I'm currently finishing up 'refactoring' the source code that I exported out of the network (it was a bit of a monolithic chunk of C-like text that needed some touching up in order to make it more readable). Next on the list: get a new language feature up and running (dubbed 'bindings', which basically replaces structured types as found in many other programming languages), which will bring the '^noun.text' and #bot.mem.who' type of writing that was currently only available in the pattern definitions, to the network's scripting language. Next, get the dreadful 'sync' feature out of the android version, which will be possible once I've replaced the 'do-pattern-parser' with the full scripting language (so that there are 'if' and 'while' type of statements available in the 'do-patterns').
And then, finally, the interesting bit: separate the input pattern definitions from the output patterns and put an extra layer in between that generates or forms the output. The Input patterns will be defined as I've already started with the Aici bot (in the form of 'subject-verb-object'), and output patterns will be in a similar form. In between, there can be several different layers like the 'not' or 'likes/dislikes', introvert/extravert or 'uncertainty' layers. Each of which gently modifying the output.
With the correct layers in between, you could have the start of a creative bot (output doesn't need to be rendered as text, but could be transformed into other things).
Also, I'm not yet certain how to call this new programming language. I was originally thinking of 'neural network language', but it's syntax is so very much C-based (more C# then C or C++), so I was thinking of perhaps calling it neural C. In the end, it probably wont matter much as I'll most likely be the only one ever using it (though I believe it is an incredible platform to develop any type of AI with).
Title: Re: NND & AICI
Post by: Bragi on August 09, 2012, 12:47:13 pm
Small update: The 'bindings' feature in the new programming language is almost working, I'm currently getting out the bugs. I've also already written the initial code-snippet responsible for decoupling input from output and putting the 'creativity' in between, just the actual layers in between haven't been written yet. 
Here's how the output-creation algorithm looks like at the moment (not tested)

Code
/*
    Activates a series of functions to modify the asset defined in CallbackIn.
    Then looks up a pattern, based on how the value for 'CallbackIn' maps to that pattern. CallbackIn should be an asset, the attribute of all the children, makes up the pattern name.
    Finally, activates the 'Output' section of the pattern that was found (which can be a topic or rule) and returns the result that was rendered. When the input was a topic, the 'questions' section will be activated, if it was a rule, the 'conditionals/output' section will be rendered.
   You can optionally specify an argument, value 'true' or 'false' to indicate if the do-patterns also need to be executed or not.
   Execution is done in another thread, to make certain that any var changes done by the rendering, don't affect any other parts.
    */
   Cluster CreateOutput
   {
      this()
      {
         var iFound = ^Bot.TextRenderers.*;                                                  //get all the callbacks that need to be called before getting a pattern to render.   
         foreach(iFound in iFound)
         {
            PushValue(callbackIn);                                                           //need to manually add the function arguments for the callback.
            PushValue(^(iFound).Args);
            call(^(iFound).Callback);                                                        //a renderer is an asset with children: Callback (value = the cluster to call), and 'Args' (possible extra values for the callback, that were supplied by the user). The callback usually modifies the cluster found in CallbackIn, so pass that also along.   
         }
         var iPath;
         foreach(var iChild in CallbackIn)                                                   //get all the attribute values so we can build the name of the pattern to activate.
            Add(ref(iPath), GetFirstOut(iChild, Statics.Attribute));
         iPath = GetCommonParentWithMeaning(Statics.CompoundWord, iPath);                    //get the compound from all the pattern names, this links to the pattern.
         if(count(iPath) > 0)
         {
            var iPattern = GetFirstIn(iPath, Statics.NameOfMember);
            if(Count(iPattern) > 0)
            {
               var exec = New(neuroncluster);
               var callresult = New(neuroncluster);
               if (Count(callbackargs) > 0)
                  AddChild(exec, callbackargs);
               AddLink(exec, callresult, Render);
               AddInfo(exec, callresult, Render, OutputSin, PatternMatcher.SplitResults, iPattern);
               BlockedSolve(exec);
               callbackout = Union(callbackout, GetChildren(callresult));
               Add(ref(PatternMatcher.ItemsToFreeze), GetChildren(exec));
               Delete(exec, callresult);
               return;                                                                             //it worked, lets get out of here so that there is no error rendered.
            }
         }
         Error("Can't map the path '" iPath "' to a pattern");
      }
   }

I'm a bit in lingo about what to do next. I need to finish these layers + add more pattern definitions (input + output) + I still need to fix the android version.
BUT, I just found this Kaggle (http://www.kaggle.com/) thing, which is soooo tempting. There are a couple of contests in there that I think I can do (within the timeframe of the contest). Some things are actually fairly similar to what I did for the  QA1WATT (http://www.qa1watt.com/) bot (which was written in something like a day, maybe 2). And others are in areas that I have already been preparing for since long ago (visual pattern matching for instance) .
Furthermore, with google  (http://www.google.com/mobile/voice/)and nuance (http://www.nuance.com/for-business/by-solution/customer-service-solutions/solutions-services/mobile-customer-service/nina/index.htm) getting into the personal assistant market, I'm feeling seriously outclassed and will always have to play a catch-up game with them, starting with getting rid of my startup-bugs and ending with a proper STT engine (that would take me years).
So, I think I'm first going to try and enter in this competition (http://www.kaggle.com/c/job-recommendation) and focus on that for a little bit (once the binding bugs are done).
Title: Re: NND & AICI
Post by: Bragi on September 06, 2012, 08:32:21 am
So, I recently entered my first kaggle competition:  http://www.kaggle.com/c/detecting-insults-in-social-commentary (http://www.kaggle.com/c/detecting-insults-in-social-commentary) I'm currently at 66th position, so somewhere in the middle of the pack. The final scores will be tested with a new dataset (the current results are based on a known dataset, so you could manually label things). That means scores can still seriously change for better or worse. So, fingers crossed!!
It's been an interesting competition so far, I again managed to seriously improve things, still have to do lots of work though. I'm hoping to get a spell checking algorithm finished before the deadline. This should push my results up some points.
Anyway, I'm definitely going to enter some more competitions on this site. Since it's allowed to form teams in most competitions, I was wondering if someone feels like making up a team?

I've been doing this work in the new programming language with the bindings and stuff. Works like a charm. I'm now able to easily customise the pattern matching algorithm, depending on requirements.
Also, I'm adding a new 'query' feature (like sql databases), which is based on the new programming language. This is all for being able to properly work with 'big datasets' like some of the competitions (datafiles of several gigs are not unusual).
Title: Re: NND & AICI
Post by: Freddy on January 27, 2013, 05:06:54 pm
Bragi, I see you have a new team member - congratulations  :)

I was wondering if your bot can run as a web service yet ?  So say I have it set up on my server, I can query the bot in a similar way to how Pandorabots works ?

Is that something currently supported or planned ?

Also, how is the character creator going and what is in the pipeline if anything ?

Many thanks  :)
Title: Re: NND & AICI
Post by: Bragi on January 27, 2013, 05:53:53 pm
Quote
I see you have a new team member - congratulations
Yep, thanks. He offered to help which is always welcome.

Quote
I was wondering if your bot can run as a web service yet ?  So say I have it set up on my server, I can query the bot in a similar way to how Pandorabots works ?
yes. Though it's been a while since I tested this feature. There is currently a simple api interface (I believe there is 1 for regular text and 1 for xml). It's also pretty easy to add new API interfaces.

Quote
Also, how is the character creator going and what is in the pipeline if anything ?
That's currently in the deep-freezer. I have to many other things to do right now, like finishing up the integration of the full code features...
Title: Re: NND & AICI
Post by: Freddy on January 27, 2013, 09:35:03 pm
I've downloaded NND and it's working here.  Some times when there is an error(?) the chatbot avatar disappears.  Closing the chatbot view and reopening it brings her back.  Mika is cute, she makes me want to make another avatar again, like I did with Tyler.

Well, first off I thought I would load up some AIML just to start with, then maybe I can work out the more complex stuff in time.  Although AIML seems pretty complex to me at times when I see what SquareBear does.

I have this trivia.aiml which appears to import and it shows stuff in the project tree.  But when I type in a trigger like...

Tell me some trivia.

I get : bot: No output defined!

I'll attach the file in case you have some time to look at it :)

One other thing is that my Ivona Emma voice is not working.  I have it selected but it's still using the old Microsoft Anna voice.

I have a few questions on the web deployment side, but I don't want to bombard you !

Cheers :)
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 07:33:03 am
Quote
I'll attach the file in case you have some time to look at it
Great. I'll have a look at it. I'm currently working on this bit anyway: I've changed a lot of stuff getting the system AIML compatible and including the 'if', 'while',... stuff. I already fixed a lot of things but haven't made a new installer yet.

Quote
Some times when there is an error(?) the chatbot avatar disappears.
Yes, this is something I also noticed sometimes, but never dug into to it yet.

Quote
One other thing is that my Ivona Emma voice is not working.  I have it selected but it's still using the old Microsoft Anna voice.
The system allows you to switch between managed and unmanaged MSAPI (tools/options). Perhaps it's in the other setting as you have now.


Quote
I have a few questions on the web deployment side, but I don't want to bombard you !
No worries, just ask.

I'll make a new release later today, cause I have fixed a lot of silly errors the last few days that had crawled into it again...
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 08:53:22 am
Freddy,
I think I already fixed the problem but haven't released it. When I loaded up the aiml file, it worked fine for me, no errors and always another bit of trivia.
Title: Re: NND & AICI
Post by: Freddy on January 28, 2013, 02:04:57 pm
Quote
The system allows you to switch between managed and unmanaged MSAPI (tools/options). Perhaps it's in the other setting as you have now.

Not that...I tried all three settings and I still get croaky Anna.

Quote
I think I already fixed the problem but haven't released it. When I loaded up the aiml file, it worked fine for me, no errors and always another bit of trivia.

Cool  O0

As for the web version.  What does my server need to have ?  I am assuming it has to be an MS server ?
Title: Re: NND & AICI
Post by: Freddy on January 28, 2013, 02:07:00 pm
Ohh,.... got it to work with Emma voice, here are the settings :)
Title: Re: NND & AICI
Post by: Freddy on January 28, 2013, 02:33:13 pm
I found a change in the naming of animations.  Tyler was not blinking.  I had this in the CSS file :

Code
<AnimationName>New Animation</AnimationName>

Which I changed to :

Code
<AnimationName>blink</AnimationName>

(And a second occurrence too)

Now she blinks again, looks like spaces are not supported now.  I only mention this in case it affects your documentation...
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 03:08:36 pm
Ohh,.... got it to work with Emma voice, here are the settings :)
Glad to hear you got it working.
Yep, that's the thing with those MSAPI voices. Not all support the same thing Emma probably didn't support ssml. That's why I added this option to select various things.
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 03:10:18 pm
I found a change in the naming of animations.  Tyler was not blinking.  I had this in the CSS file :

Code
<AnimationName>New Animation</AnimationName>

Which I changed to :

Code
<AnimationName>blink</AnimationName>

(And a second occurrence too)

Now she blinks again, looks like spaces are not supported now.  I only mention this in case it affects your documentation...

I don't think I tried this before. It's been a while since I did anything serious to this part of the application. I'll see if can put this in the documentation somewhere.
Thanks.
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 03:19:42 pm
Quote
As for the web version.  What does my server need to have ?  I am assuming it has to be an MS server ?
Yes. You need an MS webserver that supports MVC 3 (which is normally the case) and .net4 (these days also not a problem).  At least, these are the current specs. I have not yet tried this, but it should be possible to build a webserver in mono and have it run on linux.
If you have a server that supports FTP, you can have the designer application install the web application (and db) automatically after supplying some parameters (like upload location, username and password). You can also install it manually, but you'll have to edit web.config and enter the parameters manually + add the db yourself.
A small note though: I recently changed my build system (after upgrading to win8), the zip file that contains the website is created automatically during the build process. I haven't checked yet if everything is still ok in this area.
Title: Re: NND & AICI
Post by: Freddy on January 28, 2013, 03:31:46 pm
I'm playing with the ALICE (Alice.dpl) project.  Here's some observations.

When scrolling through larger sets of data it freezes and sometimes it sends you to the bottom of the data.  So it's difficult to navigate.

The 'find' feature seems to freeze the program unless I am not using it right.  Say I load 'update1' and use 'find' to search for 'What is your name'.  The search results appear, but when I click on one the whole thing freezes.

Perhaps I should wait for your newest update in case some of these things have been fixed.  ???


RE: the web server - ok thanks, I can't do that then as my server is PHP/Apache.  Maybe one for the future :)
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 05:19:27 pm
Quote
When scrolling through larger sets of data it freezes and sometimes it sends you to the bottom of the data.  So it's difficult to navigate.
Yes. this is a problem caused by the WPF library. With larger topics, I need to turn on 'Virtualization' or it uses tons of memory and takes a couple of minutes to load, but then you get the problem you just described. I know how it can be solved, but that requires a couple of months to fix (basically a complete re-write of the UI component that uses the lowest level of drawing api's instead of default WPF).
So I currently solved it by providing a master-detail view, which remains fast.  In the editors' local toolbar, the 2 last buttons allows you to switch between view.

Quote
The 'find' feature seems to freeze the program unless I am not using it right.  Say I load 'update1' and use 'find' to search for 'What is your name'.  The search results appear, but when I click on one the whole thing freezes.
Yes, I recently fixed an issue with the search features that had crawled in there after adding some of the features for AIML support. I haven't yet tested it again on the alice set though, which is fairly big. I might also have to add some speed improvements here and there.

about the webserver. I haven't tried this, but there is this: http://www.mono-project.com/Mod_mono (http://www.mono-project.com/Mod_mono)
Title: Re: NND & AICI
Post by: Freddy on January 28, 2013, 06:29:53 pm
Quote
So I currently solved it by providing a master-detail view, which remains fast.  In the editors' local toolbar, the 2 last buttons allows you to switch between view.

Great, thanks, I will give that a look then.

Quote
about the webserver. I haven't tried this, but there is this: http://www.mono-project.com/Mod_mono (http://www.mono-project.com/Mod_mono)

Never seen it before, will put that on my to-do list.  Thanks.  O0
Title: Re: NND & AICI
Post by: Bragi on January 28, 2013, 06:47:50 pm
I did some more checks with the search on alice, and there are indeed at least 2 things still going wrong. Thanks for that Freddy.
Title: Re: NND & AICI
Post by: Bragi on January 29, 2013, 01:24:46 pm
Ok, I've made a new release, which should fix most of the above issues.

Freddy, I'd appreciate it if you would try the search again, see if the results are as you would expect.
I've also updated the topics subject (and simple-subject), object (and simple-object0, 'what is' and 'SubjBeObj'.
Title: Re: NND & AICI
Post by: Freddy on January 29, 2013, 04:30:25 pm
OK great, I will take a look asap, got stuck with something I was playing with at the moment...

http://aidreams.co.uk/forum/index.php?topic=5017.new#new (http://aidreams.co.uk/forum/index.php?topic=5017.new#new)
Title: Re: NND & AICI
Post by: Freddy on January 30, 2013, 02:16:41 pm
Bragi, I'm a bit confused as to what I need to download from where.

I was using the 'neural network designer'...

I went to Sourceforge and see you have a new CBDesigner.exe, but I looked in the nnd folder and don't see the old version.

Can you point me in the right direction please?

Cheers :)
Title: Re: NND & AICI
Post by: Freddy on January 30, 2013, 02:19:34 pm
I just realised it's probably an installer for nnd and NOT 'Chatbot Deisgner Pro'- will download :)

Title: Re: NND & AICI
Post by: Bragi on January 30, 2013, 02:29:27 pm
yes, I should update the name of the installer. Forgot about that.
I'm still making some bugfixes, mostly in the code section today: when you delete a 'do/code' part or edit it, some stuff gets deleted which shouldn't. Also adding some better support for unknown words in the default topics.
Title: Re: NND & AICI
Post by: Freddy on January 30, 2013, 04:03:53 pm
Still getting the avatar disappearing...

But, the search - yes this is working in the quicker browser, see attached images.

But using the buggy (did you say WPF ?) it finds a term, but I am unable to click on the result and get directed to the data.  (image search1)

In the alternative browser (which is great and fast), the search and find works perfectly well (search2 image).

Just a little thing came up, this is actually what I was using the search for, but I still can't find how this line is interpreted :

Quote
You: what is my name ?
bot: Your name  ? Is that correct English?
You: My name is Freddy
bot: How can I help you,#user.name:nameorvalue.
You: What is my name ?
bot: I don't know.  What is your name?.     I'm so happy we are having this conversation.

Notice how the variable is used rather than the name supplied.  And it looks like the username is not being recorded.  I understand the AIML feature is new though, just wanted to report things to you :)

In general it's really looking good though, well done :)
Title: Re: NND & AICI
Post by: Bragi on January 30, 2013, 06:06:51 pm
Quote
Still getting the avatar disappearing...
yes, I hadn't done anything about that yet. Do you know how to easily reproduce this?


Quote
Notice how the variable is used rather than the name supplied.  And it looks like the username is not being recorded.
Yep, something's definitely going wrong there. I'll have a look into it. Thanks.

Quote
In general it's really looking good though, well done
Thanks.
Title: Re: NND & AICI
Post by: Bragi on February 05, 2013, 02:28:54 pm
So, I think I fixed most of the issues with the AIML importer and the character engine. There's a new release available from the download site.
Freddy, you are working with an SSD harddrive, right? How is the operational speed of Alice on your computer? There is currently still a bottle neck happening when a large block of data needs to be read from disk, I have some possible solutions in mind, but I was wondering what happens on SSD disks.
I've also written a series of articles about the library itself:
http://bragisoft.com/2013/01/technical-overview-of-nnd/ (http://bragisoft.com/2013/01/technical-overview-of-nnd/)
http://bragisoft.com/2013/02/including-neural-nets-in-your-own-applications/ (http://bragisoft.com/2013/02/including-neural-nets-in-your-own-applications/)
http://bragisoft.com/2013/02/working-with-the-db-from-net/ (http://bragisoft.com/2013/02/working-with-the-db-from-net/)
Title: Re: NND & AICI
Post by: Freddy on February 05, 2013, 03:03:08 pm
Quote
So, I think I fixed most of the issues with the AIML importer and the character engine. There's a new release available from the download site.

OK, busy to day so will take a look asap.

Quote
Freddy, you are working with an SSD harddrive, right? How is the operational speed of Alice on your computer? There is currently still a bottle neck happening when a large block of data needs to be read from disk, I have some possible solutions in mind, but I was wondering what happens on SSD disks.

If you mean generally chatting to the bot, then it is fine responses all seem to come within a second or less as far as I can tell.

Quote
I've also written a series of articles about the library itself:

Sweet  O0
Title: Re: NND & AICI
Post by: Bragi on February 05, 2013, 03:31:45 pm
Quote
If you mean generally chatting to the bot, then it is fine responses all seem to come within a second or less as far as I can tell.
That's interesting. Not on my pc. It all depends on the order. If I start with something like 'What is your name'  ('what is' is often defined in alice), I get a slower response, but because of the buffering, this gets better, and can occasionally drop again.

Quote
OK, busy to day so will take a look asap.
No worries....
Title: Re: NND & AICI
Post by: Freddy on February 05, 2013, 03:41:55 pm
OK I will test that aspect again later :)
Title: Re: NND & AICI
Post by: Bragi on February 07, 2013, 02:00:51 pm
more documentation, this time about decision trees:
http://bragisoft.com/2013/02/creating-and-using-decision-trees/ (http://bragisoft.com/2013/02/creating-and-using-decision-trees/)
Title: Re: NND & AICI
Post by: Freddy on December 17, 2013, 05:21:59 pm
Are you still working on the NND Bragi ?
Title: Re: NND & AICI
Post by: Bragi on December 17, 2013, 05:43:21 pm
for now, no I'm not doing anything on this project.
This can change again though in a year or so when we finally get to adding 'chatbot' features to the home automation (it wasn't one of the primary features people asked for). But it will definitely be with an updated version where all the 'experimental' stuff is removed from NND with a focus on stability (read: a rewrite of the engine). AI features wont run on the NND project either, but will be based on some of the ideas and concepts that I picked up in this project. That's scheduled for the second quarter of next year, so before the chatbot features.  I'll be working together with an AI professor for that (should be interesting).
Title: Re: NND & AICI
Post by: M0RPHE0US on April 26, 2016, 11:39:04 pm
Bragi where are you!     :'(
Title: Re: NND & AICI
Post by: Korrelan on April 26, 2016, 11:58:50 pm
I can almost envision the wind and rain pelting across the moor in the darkness; as the two lost souls strive to find each other, endlessly running towards the sounds of their soul mate's cries in the night... only too perish within a breadth of reconciliation... never knowing the comforting embrace... to lie together, but for ever apart... on that cold dark moor.

Yup! I've been on the rum again. Hehe!  :P