Ultron7's J.A.R.V.I.S. Discussion

  • 24 Replies
  • 8366 Views
*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1299
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Ultron7's J.A.R.V.I.S. Discussion
« on: February 10, 2015, 03:47:51 pm »
For the sake of friendly discussion, here I'll share some of my perspectives.  They are definitely not intended to criticize any project, especially J.A.R.V.I.S... But the right to interject a little funniness for entertainment value is hereby reserved. Going with SQLite, and C++ on a commercial operating system? May as well support open source operating systems too. Why not? ChatScript, for example, is written in C++  and it compiles the same codebase in Visual Studio on Microsoft Windows and g++ on Linux with a bash shell script. FYI: The C++ compiler in the GNU Compiler Collection, is called g++.

How about running a highly secret research lab in PHP?  With the SQLite3 extension enabled by default in PHP version 5.3, being generally easier, PHP may even inspire solutions when C++ development faces a challenge. For the top secret PHP project, go with MySQL on a Linux Apache MySQL PHP (LAMP) server.  Why?  Well, just keep reading...

Not to disparage SQLite in any way... Seriously, SQLite is really a cool database, apparently a commercial success for A.I. products in the past.  Yet, an SQLite issue worth flagging early on, is performance.  Since SQLite is self-contained and serverless, it may slow down in performance as it grows larger and larger.  The "Lite" in "SQLite" stands for lightweight.  Usually, A.I. outgrows lightweight pretty quickly, so it is worth planning on that possibility. 

Like Assembly Language, and C Language, C++ may be considered more powerful than any web programming language, Perl, PHP, Python, Ruby, Java, JavaScript... etc to build Artificial Intelligence, because C++ is compiled and the web is just slower than even a standalone computer from yesteryear.  Yet C++ may be quite limited when it comes to running on  the web. Most shared webhosts won't support C++. Indeed, a C++ crash may be rare if you are careful. However, crashing a webserver shared by customers is simply not an option. Although not as fast and powerful as compiled C++, it certainly takes great effort to reach the limits of PHP.  Nearly every webhost supports PHP. In most cases, it may be important for a new A.I. to learn and grow from interactions with the public.   

There are indubitably other likelihoods, probabilities and possibilities... So please, let's hear from you, what are your perspectives?

 
« Last Edit: February 10, 2015, 04:09:24 pm by 8pla.net »
My Very Enormous Monster Just Stopped Using Nine

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #1 on: February 10, 2015, 07:12:05 pm »
I am not ashamed to admit that C++ is the only language I understand at this level, and I have chosen SQLite because it seemed easier to learn for starters. I have been also learning Java and C# for a while, but I am not quite that far yet. And as far as web-programming goes, I can only work with HTML, CSS, Javascript and only 'read' PHP.

Also, I have been working on Windows since my first computer, so I would not start something like this in unfamiliar grounds.

And I don't see why all this is a problem. The program shouldn't be too dependent of Windows because I am also planning to make peripheral versions for Android that communicate with the main program like with a server. But for now I am really just looking to test some concepts and how I do it is of no importance to me.

There should be 3-4 databases, two of which will contain approximately 540 thousand words and the other one or two is expected to contain about a million elements each. So yes, I will probably be looking for more efficient solutions in the future.

But since I am not showing off any programming skills and the center of importance is the idea and implementation itself, it does not matter in which language I post the source - besides, an experienced programmer could easily port it to another (did I mention the main.cpp is smaller then SQLite3? And it will remain small.).
Software and Hardware developer, and everything in between.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1299
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #2 on: February 10, 2015, 09:05:06 pm »
Oh, just the opposite (of shame), C++ programmers have plenty to be proud of, such as being professional developers for the most part.  Aside from machine code, assembly language, and considering C Language is included in C++ ...  If I had to choose one computer programming language to build the most advanced A.I. possible. My choice would be C++. 

Would you consider object oriented PHP with classes, to show how similar it is to C++,  to be off topic?  I'm happy to limit the discussion to C++ programming and SQLite, if that is the theme you are after for this your thread.
My Very Enormous Monster Just Stopped Using Nine

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #3 on: February 10, 2015, 10:28:19 pm »
I would love to explore other languages and experiment which behaves best in a given case. They say Lisp is the best for AI programming however I believe the language only influences mostly the efficiency - which is not trivial, but also not essential.

As I said, I am currently focused on the theory behind the program, and I do not intend to improve the code until the idea behind it.
Software and Hardware developer, and everything in between.

*

8pla.net

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1299
  • TV News. Pub. UAL (PhD). Robitron Mod. LPC Judge.
    • 8pla.net
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #4 on: February 17, 2015, 05:52:41 am »
I just had sweet success on a piece of code, I'd been looking to write, just to see if I could do it.  First few attempts though, I called it quits a few times.  "Not today...", I'd say to myself.  And, then I would go back to it, the next day and manage to get it a little bit closer. And the day after that, even a little more closer.  Suddenly, one morning everything just became clear, finally it was implemented.  My theory all along was correct.  As for my earlier failures, they contained certain code snippets that were working correctly. So, I just cannibalized them for parts.
My Very Enormous Monster Just Stopped Using Nine

*

Don Patrick

  • Trusty Member
  • ********
  • Replicant
  • *
  • 633
    • AI / robot merchandise
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #5 on: February 17, 2015, 08:26:36 am »
Good to see you programming, Ultron. Is there a reason you are using both 'string' types and 'char' types? I only ever work with one of either.
CO2 retains heat. More CO2 in the air = hotter climate.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: J.A.R.V.I.S.
« Reply #6 on: February 17, 2015, 10:27:33 am »
Yes Don, there is. Many different functions (both from the basic header set and sqlite3) require you to mix different types. I had chosen to work with strings mainly, but this means I have to write an additional 3 (sometimes up to 5-6) lines of code just to convert one type to another.

And it is not as simple as converting from one type to another - it is often the case that two types cannot be converted directly, so they have to undergo several conversions first. It is not easy to keep track (even when you have a comment after every function), as you can see from the picture, but I still manage to get an accurate conversion. It could cause problems with efficiency and speed however, because of all the additional lines (each with a function or two) which are mostly in loops within functions within functions... What!?

And 8planet... Yes I get that feeling often, but not because of all the programming errors. I sometimes stumble upon a rock (in my head) - I find out that this method of (let's call it) NLP, I somewhat limited. Yes there are obvious ways to improve it (I have concept updates for the next 2-3 versions) but sometimes it just isn't gonna do it. But that's good because I get to explore all the disadvantages of chat bots.

This program is intended to be a smart house assistant, not Artificial Intelligence. I believe (and hope to prove) that true NLP can never be achieved with classical methods. I believe that for true NLP a 'creature' must be able to associate each word with a sound, picture, feeling etc. so it can truly 'understand' it and thus be able to truly 'process' a sentence as opposed to what is done today - 'computing' or merely 'calculating' the output.

To make the distinction more clear - it is like comparing somebody who learns and understands the study material with somebody who merely memorizes the texts.
Software and Hardware developer, and everything in between.

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Trusty Member
  • **********************
  • Colossus
  • *
  • 5865
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #7 on: February 17, 2015, 01:39:12 pm »
With all respect then how will your home automation assistant differ from say, Hal2000 or Homeseer or countless others on the market?

Is it to perhaps have more of a customizable and useful personality? Set timers, appointments, reminders, shopping lists, inventories, etc.?

Thanks!
In the world of AI, it's the thought that counts!

*

Don Patrick

  • Trusty Member
  • ********
  • Replicant
  • *
  • 633
    • AI / robot merchandise
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #8 on: February 17, 2015, 02:53:04 pm »
You'll probably want to use the official term NLU (natural language understanding) instead of "true" Natural Language Processing.

If you have to do multi-line type conversions repeatedly, personally I would program mini-functions to do that with a single function call. It may theoretically take an extra microsecond but I find it much clearer to code and debug. For example, I made a custom enhanced version of "!strcmp()", simply called "is()", that my program calls several thousand times per sentence analysed, but it still replies instantaneously.

Anyway, coding tips aside, I am more interested in what Art is asking :). I'm always trying to make my AI some kind of useful, but I've found that a lot of the personal assistent tasks could equally be done with windows speech macros and a handful of voice commands.
CO2 retains heat. More CO2 in the air = hotter climate.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #9 on: February 17, 2015, 11:10:55 pm »
Yes Don I have been considering making functions for that but for now they won't save me much lines - maybe if the program grows in source size.

Anyway, I am not too familiar with all of the features other assistants provides, but bear in mind this is a sort of proof-of-concept with no commercial aim. But anyway some of it's top features would be:

 -The ability to learn to reply to any sentence (it should in time be able to learn from both reading text files, internet and sometimes ask the user for help if previous fail);

 -To keep the program small and fast but still be able to do anything you would need help with (turn on the TV, lights etc.) I am planing to implementing a database containing addresses from where it can call various mini-programs (batch files, exe's etc). This should be implemented after a few processing tweaks and the update to jDB IV (which would enable it to understand if a sentence is a command, question, statement etc.). It should also be able to write it's own programs (most likely by filling code forms with parameters provided through normal conversation, so it can learn to do new things for you.

 -I believe personalities can only be simulated, and very poorly too. You can't just change a few parameters and get a new personality. However there will be of course a distinction between different copies of the program - the databases should be very different. Also it could easily remember user preferences such as how often do you want a status update, weather, local news etc. But I will not attempt to take it further than necessary.

To summarize this, it is intended to be a highly adaptable and dynamic program. It can improve it's conversation skills, update it's databases, learn new 'skills' and most importantly it adapts to the user in a real, non-commercial, 'natural' way. Not to mention (once it reaches jDB III / IV ) it should be able to reply to nearly all of the user input correctly.

I am not sure what my goal is, other then proving a small concept and gaining some experience with programming AI. The updates I have planed are not complicated - the concept is simple and the only thing that can slow me down is technical issues.

It is all on paper - ideas, methods, problems - just need to get it compiled. Also anyone is welcome to budge in, if they have the nerves. I am not sure how multiple people working on the same file would work, but contributing with some coding tips or functions that ease these processes is much appreciated.


P.S. Thanks for clearing the terms up as well, Don. Also Art, it should be easy to implement timers, alarms etc. with mini applets as mentioned previously.
Thank you all for the interest in the project :)
Software and Hardware developer, and everything in between.

*

Don Patrick

  • Trusty Member
  • ********
  • Replicant
  • *
  • 633
    • AI / robot merchandise
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #10 on: February 19, 2015, 07:46:39 pm »
The first thing I noticed was that you were declaring "string sugOutPatP" twice. More importantly, the first time you declare it you don't set any value to it. This causes that string to contain random garbage values. You then set the other "string sugOutPat = sugOutPatP", which results in the garbage values being transferred to sugOutPat. Which can make your program blow up, crash, malfunction inexplicably, anything.
I make a habit of always assigning an empty "" value to any strings I declare to prevent such malfunctions.

What you seem to have fixed is the second declaration, by removing the word "string" within the "if()" statement. With the word "string" in front, the string, despite sharing the same name as the first, only existed within the "if()" statement, outside of which any reference to "sugOutPatP" would still refer to the first declared, unaffected and valueless, version.

Haven't looked at your new problem yet. Let me know if you've fixed the first one properly.
(also if you post the actual code instead of screenshots I could easier copy-paste and explain)
« Last Edit: February 19, 2015, 08:09:22 pm by Don Patrick »
CO2 retains heat. More CO2 in the air = hotter climate.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #11 on: February 19, 2015, 11:04:56 pm »
Yes you are right. There were a few problems caused by declarations placed in the wrong place, like the one that was placed in the if statement but although incorrect they were not the key to the problem. I actually fixed that fairly quickly however I do not post an update after every tiny bug I fix :)

Also, you can see a lot of pointless cout's and declarations and variables in my code at this phase - this is because of my preferred way of debugging. I place some cout's, try to move or copy the values of variables to others in order to pinpoint the exact problem.

I learned a great deal from all of these mistakes, but most of them were made because I was rushing to get this program working so I skipped some thinking and because I had to change the original code a lot there were many errors such as "=<" instead of "<" and so on.

I will post and update in a few minutes. In the meantime I would ask if Fred or a moderator can move the discussions to the other thread created for that specific purpose - just to keep this thread tidy and easy to find the actual useful content (not that the discussion is pointless, but you get my point).
And thank you all for your interest and everyday input on my ideas as well as taking the time to check out bits of the code for errors :) It is the psychological support that is the most valuable.
Software and Hardware developer, and everything in between.

*

Don Patrick

  • Trusty Member
  • ********
  • Replicant
  • *
  • 633
    • AI / robot merchandise
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #12 on: February 21, 2015, 07:22:08 am »
I see, so the other thread is strictly for monologueing? I'll ignore it then because of my tendency to offer solutions when people post problems.

I do think that the ability to remember user preferences, or rather learn the user's habits, is fairly novel.
CO2 retains heat. More CO2 in the air = hotter climate.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #13 on: February 21, 2015, 12:11:42 pm »
Well not so strictly, but since it's meant for updates I don't think it should be mixed with discussion. Not that I mind anybodies comments - on the contrary, I thank you all for the interest. Also if anyone happens to post there by accident nobody will mind - it's the moderator's job to move topics anyway :P

And thank you for all your input Don :) It is good to know there are still people out there who want to help because...they want to help! And not earn money or some virtual 'reputation' (I hate the StackOverflow community - for the record).

Anyway, I see the aspect of adapting to the user as essential, not a good or novel addition to the program. If this is going to be an 'A.I.' project, then it must be able to change on it's own and adapt to the environment - in this case, the hardware it is installed on and the user commanding it.
And for the record, the project is Open to anyone who wants in on it - Jarvis is just the first stepping stone in the whole 'franchise'. I have so much functions, concepts and database designs on paper but my inexperienced self can only manage to code so much with my time.

I have designs for 4 more updates on the database design (all the way to jDB - V) and have also been designing a 'grammar processing engine', which would involve creating a program much like Jarvis except it would work on a different principle but also create a C++ header that other's can use it to ease their chatbot projects. I am looking forward to one day compare these two methods of NLP (or more appropriately NLU) to find out which one is more agile.

The 'flagship' of all these projects and ideas is a concept for a true A.I. that should be able to become 'human' in a psychological way. During the summer I plan on making a makeshift robot / android which would serve as a platform for the A.I. (the concept involves it being able to 'experience' things in a physical manner).
Software and Hardware developer, and everything in between.

*

Ultron

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 471
  • There are no strings on me.
Re: Ultron7's J.A.R.V.I.S. Discussion
« Reply #14 on: February 22, 2015, 05:48:42 pm »
Well the first prototype is finally complete and running smoothly. I made some final tweaks (mostly aesthetic) and another fix for one of the character counters. The databases are VERY limited and I am having a very hard time finding and easy way to shove 500k words into them. I have found many project which are either lists of English words - even managed to find some which are listed along with their corresponding linguistic 'types' or 'parts of speech' however my structures differ greatly and at this point it seems I will have to manually fill the databases.


I have also managed to make an installer for Version 0.1A - this is really just for the experience and education, but nonetheless it saves you a few extra seconds in case you simply wish to try out the prototype.



Some projects that might be of potential use:


http://wordlist.aspell.net/
http://www-01.sil.org/linguistics/wordlists/english/wordlist/wordsEn.txt
http://en.wikipedia.org/wiki/Moby_Project


Just sharing these in case anyone else might find a need.


Anyways, I have began coding Version 0.2 - so far I have completed one new function, did some minor code tweaking and also began upgrading the database system to jDB II. This means that AwDB will now contain two additional fields - 'preceeded' and 'VERB_FORM'. The latter is used for words that can (besides their MAIN_FORM / type) also be verbs. If a word cannot be of a verb type in any case, then the field is left with value NULL.


Also, Version 0.2 is planned to contain a TTS engine (I am not sure which) and this should just represent another aesthetic tweak and since I have previous experience with TTS in C++ it shouldn't be much a job.


It may also be worth noting that JARVIS is not expected to be of any particular use until Version 0.3, which is planned to allow you to communicate with the program via microphone and execute external programs (most likely going to implement a batch caller function).
And while this version might be of technical use, JARVIS is not expected to be a proper 'chatter' until I implement jDB V system (possible version 0.4 - 0.5).


I'd also like to point out (again) that I do not expect this program to ever become a smart and human-like chatterbot. I believe this is nearly impossible - specially if you want the program to have a character of his own. Our character is determined by so many things and a lifetime of experiences - something I doubt programmers will ever be able to 'code'. Though it may not be entirely impossible - just not to that 'natural' extent.
Software and Hardware developer, and everything in between.

 


Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 15, 2024, 08:14:02 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am
Nvidia Hype
by 8pla.net (AI News )
December 06, 2023, 10:04:52 pm
How will the OpenAI CEO being Fired affect ChatGPT?
by 8pla.net (AI News )
December 06, 2023, 09:54:25 pm
Independent AI sovereignties
by WriterOfMinds (AI News )
November 08, 2023, 04:51:21 am
LLaMA2 Meta's chatbot released
by 8pla.net (AI News )
October 18, 2023, 11:41:21 pm

Users Online

310 Guests, 1 User
Users active in past 15 minutes:
squarebear
[Trusty Member]

Most Online Today: 335. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles