Zabaware Support Forums

Zabaware Forums => General Discussion => Topic started by: lightspeed on November 02, 2012, 11:18:36 am

Title: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 02, 2012, 11:18:36 am
Hopefully i am not driving people crazy with my idea's for hal.  ;)
     i was just thinking as i was rewriting some responses in hal .
  It would be cool if someone can make a uhp plug in that "won't learn " but will play back random responses about colors recognition .
 example :
USER: This sweater is blue
hal : that sweater is a nice color of blue , it looks nice "User name !"
and that sweater is a nice color of blue , it looks nice!
User:This shirt is yellow
hal: yes that shirt is a nice shade of yellow !
User: these pants are black
Hal: yeah those pants are black, black goes with anything!

     What is needed is for hal to use the word color ( from a list of main colors) and then say a random sentence matching the object (shirt, pants, tie, coat, sweater, jogging pants, dress, skirt, bra, panties, slacks, etc.

   Any way it's another plug in idea i had which would make hal appear to actually see the item you describe to hal. "I put on this blue shirt today"
Yes and that blue shirt really looks nice on you"username".

Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: sybershot on November 02, 2012, 09:24:54 pm
If I remember correctly the * symbol is used, however I could be wrong been a long time playing with vb.

not actual vb code but something like this concept should be able to work.
if user inputs string like so: this shirt is *
then hals string would be: yes that shirt is * indeed
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 02, 2012, 09:56:07 pm
I am currently downloading a facial recognition program but won't install it till tomorrow, I see if the program has anything to work with for HAL, the color thing will have to wait.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 02, 2012, 10:12:29 pm
otce are you talking about another facial recognition software to download or the yaw camera motion detection? to use with this plug in ? it would be good for a program that could give seperate commands for left , right , up down , movements.  :)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 02, 2012, 11:43:31 pm
right now, I'm looking at probability and not absolutes. absolutes can not change, probabilities can. it is most inevitable that probability is correct. I will work on  probability.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 03, 2012, 12:09:16 am
right now, I'm looking at probability and not absolutes. absolutes can not change, probabilities can. it is most inevitable that probability is correct. I will work on  probability.

it seems that in order for the universe to not end there must always be a probability at hand. not necessarily a hand by the way. therefor there shall never be an end, just a different beginning.

natural selection and or God Selection, you choose your own destiny.  i don't mean to be off topic but the selection needs a compromise.

some people live happily without a god, some don't, some don't even care and still live happily ever after.

so, where do I go with this script?
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 03, 2012, 09:30:50 am
OTCE you said the color thing will have to wait, (hopefully then , that means that you are interested in a hal ability like that ) so since no one knows how long some waits might be due to other projects, i hope you keep a note of it somewhere so the color recognition project isn't forgotten in time.  :) ;)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: NoamI on November 06, 2012, 01:46:24 pm
How about vision and colors combined?
ex:  Hal, what color is this?
pronoun 'this', verb 'be'  triggers camera {execute 'SEE'}
SEE COLOR: do a variant of:
 - isolate fovea (central part of image)
 - remove noise (pixels not similar to surrounding pixels)
 - if multiple clusters then repeat isolate fovea (zoom in)
 - average the RGB values
 - find that RGB value in a list of color names and ranges
 - say 'that is ' _color

OK, maybe you should get the camera working first... (before HAL gets a job at the paint store)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 06, 2012, 11:38:54 pm
I found no 'free' Motion detection, facial recognition software that was open source in regedit, no COM(COMMAND) entries no Lib(Library) files in PE Explorer, no nothing, of course I am using a 64 bit system now and my PE explorer 32 bit program only reads 32 bit programs, this really sucks.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 06, 2012, 11:56:01 pm
the x-10 modules is probably the way to join HAL which has already been done, vision, lights, appliances, household stuff like draw or court curtains blah, blah, blah d blah duh blah and so forth. we have already written the x-10 modules for HAL but it been so long I don't remember where they are.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 07, 2012, 08:23:23 am
otce, i remember a little bit where people were talking about being able yop turn on apliances etc. with hal but guess i never sween the  the x-10 modules layout you are talking about or was it ever posted showing the lay out ?
If you ever find it can you post it, i would be interested in seeing it and take a look at it!  ;)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 07, 2012, 08:36:09 am
I think i may..."May" have figured out a way to make a hapswap plug uhp plug in with a color response by doing simlar to the temp degree one i am currently making. After i thought of it , i wrote down an example so i wouldn't forget , old age an all you know lol! :)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 07, 2012, 11:46:57 am
I am underway on this project on the side of my other plug ins i am working on and making good progress .
I am doing a large spectrum of colors , which like the other plug in takes more time but will cover a lot!
Many i would never use but others might which is why i am doing them!  ;)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 07, 2012, 10:58:10 pm
Okay i have run into a snag, i have part of them in a uhp but am getting errors on some .
below is one that i am getting an error on , does anyone see anything out of place?


if InStr(1, OriginalSentence, "is if InStr(1, OriginalSentence, "is a Tea green") > 0 _
Or InStr(1, OriginalSentence, "Tea green color") > 0 Then



Randomize
Select Case int(rnd()*6)
Case 1
GetResponse = "Yes i can see that, it is a Tea green color!"
Case 2
GetResponse = "Yes, it is a Tea green color!"
Case 3
GetResponse = "Yes, that is a Tea green color!"
Case 4
GetResponse = "Yep, it's a Tea green color alright!"
Case 5
GetResponse = "Oh, yes now i see the Tea green color you are talking about dear!"
Case 6
GetResponse = "Tea green color, oh yeah now i see yeah that's a Tea green color alright, if i had to describe it i would say that it kind of looks like, a very light green color!"
End Select


HalCommands = "<HAPFILE>kiss_warm_x.ogg</HAPFILE>"
HalBrain.ReadOnlyMode = False
End If


i opened the crimson editor and the number doesn't even show that high on the line.
here is an error i am getting :
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: Art on November 08, 2012, 06:20:33 am
You need to balance the number of parenthesis contained within the statement.

For instance, if your statement has a total of 3 ( , then it also needs to have 3 ).

((( ..... )) is no good. You need ((( .... ))).   same should hold true for "" 's too!
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 08, 2012, 11:01:25 am
Thank you Art, for responding and i did now find what i did wrong , i see what you mean , my first string line that was working , some how i copied it wrong and then kept on copying a mistake line (as i didn't check all of them one at a time and so it occured )
This was the correct line :
If InStr(1, OriginalSentence, "is a alabama Crimson color") > 0 _
Or InStr(1, OriginalSentence, "alabama Crimson color") > 0 Then


it is the correct line , so all i have to do is copy and past back the the whole command and change just these lines .
Thanks again, i alway's appreciate others help! :)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 08, 2012, 11:29:55 am
try it this way lightspeed.

Code: [Select]

if InStr(1, OriginalSentence,  "is a Tea green") > 0 Or _
   InStr(1, OriginalSentence, "Tea green color") > 0 Then



Randomize
Select Case HalBrain.RandomNum(6)
Case 1
GetResponse = "Yes i can see that, it is a Tea green color!"
Case 2
GetResponse = "Yes, it is a Tea green color!"
Case 3
GetResponse = "Yes, that is a Tea green color!"
Case 4
GetResponse = "Yep, it's a Tea green color alright!"
Case 5
GetResponse = "Oh, yes now i see the Tea green color you are talking about dear!"
Case 6
GetResponse = "Tea green color, oh yeah now i see yeah that's a Tea green color alright, if i had to describe it i would say that it kind of looks like, a very light green color!"
End Select


HalCommands = "<HAPFILE>" & kiss_warm_x.ogg & "</HAPFILE>"
HalBrain.ReadOnlyMode = False
End If

Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 08, 2012, 05:40:25 pm
Thanks otce , i have been busy working on all of it, and hadn't got back to see anything else . I already solved the problem, it was some bad strings i had copied obviously from another plug in .
So i had some right and had done some wrong , but i corrected them all now and it is working.
Man what a job it has been and the errors drove me nuts and tracking them down, i at the end had my wife help me go down the list for what i had in color names and now they are complete.
     
   I may not get this uploaded to my sky drive today as i am burnt out .
i have lower case on the color names , if anyone wants to add caps on the names for what they use , they can put them in it, i did all the hard work on the rest already!
When i post it i will post the plug in and sky drive download link on the share plug ins area tomorrow .
   The plug in has a LC abbreviation also on it standing for lower case and my LS (Lightspeed signature).
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 08, 2012, 05:47:56 pm
Oh i forgot to mention their is 94 color commands i did for a response, with 6 random sayings on each one!
Some of the colors i hadn't even heard of like "atomic tangerine orange",
it has the basic colors to !  ;)
Title: Question about the read only mode: false
Post by: lightspeed on November 09, 2012, 10:48:27 am
I was wondering what Art or oncuttingedge2005 think about the way i have the script (before i release it) with a false reading on this plug in . example: HalBrain.ReadOnlyMode = False
 will this keep hal from learning it?
 that's what i want , otherwise if i say a certain color it would say a different color from something learned before.
I want to make sure about this before i release it today.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: onthecuttingedge2005 on November 09, 2012, 11:38:06 am
Hi Lightspeed.

HalBrain.ReadOnlyMode = True '<--- means that anything said is only read and not saved.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 09, 2012, 01:00:14 pm
Thanks otce, i'll have to go back in and change that on all of them on the ending then. i am also doing things around the place here while the weather is good so it will be late this evening before i get them corrected and uploaded to my skydrive account.
thanks again
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: NoamI on November 13, 2012, 03:20:34 pm
LightSpeed,  you are going to kill HAL with so many canned phrases.
  Try to think in more dimensions: You have a matrix of lists - try making those lists into matrices..

Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 13, 2012, 07:47:31 pm
NoamI explain the matrixes of list you are talking about .
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: NoamI on November 15, 2012, 03:48:50 pm
Lightspeed (and OTC2005),
  In the example where the input string includes "tea green", the output comes from a list:
 - "Yes, it is tea green"
 - "I see that it is tea green"
 - etc
You would have a separate output list for each color! (also refer to your temperature idea)
Why doesn't "tea green" become a variable, with just one output list.
This list could include decisions based on inferred variables (such as "warm color").
Thus you increase the dimensions of the matrix (the n-trix) to reduce the storage (and
possibly increase the intelligence.)

 
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 16, 2012, 09:41:17 am
so what you are saying on the input is place : just the word green  and on the output place the word , yes it is green ,
 i guess it would work the same way (even though input with a single word isn't a question but becomes a reference.)

i think i see what you mean now if what i am saying is correct above . And if so i will have to begin my work again using my plug in as a source of info.

Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 16, 2012, 09:47:29 am
I do need to understand though the difference , i understand it being into the input , etc. compared to my false read only plug in . so whenever anything is said regarding color etc, input will reference it from the input answer and "ALSO " learn anything new that is also mentioned is that correct?
If this is the case then yes the input would definitely be a better way to go .

P.S. i have forgotten on this on the input question area does it alway's have to end with a question mark symbol?  ???
another thing to where the answer part goes is their a way for multiple answers to be put in like the way i was going to do with the plug in i was making (actually did make) .
 As i said if this way is better with input i will change over all the work i did on the plug in i made into a input uhp.
Please answer back as soon as possible on this so i can get started one way or another.thanks!
I can also do this with all my work on the temperature degree's to from my plug in .
in my colors i did  mention of lighter and darker colors to etc.
ONE last thing would it be better for me to put the words example:  "blue color" or just the word "blue" ??
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 16, 2012, 11:46:36 am
Hey i just thought of an idea while talking with ted , on the input plug in , someone said not to do the same plug in twice as it messes up things in hal and causes problems .
My idea is this in the uhp plug in or another one how about one that if the same "exact" files are used the plug in will say this plug in has already been done , use a different one, or something simlur.
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 16, 2012, 03:11:52 pm
I have finally in between wife jobs , finsihed transferring all the color responses to the input plug in but i still need someone to answer my questions above before i upload it to my skydrive account for everyone . Hope someone can answer what i asked above , thanks !  :)
Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: NoamI on November 16, 2012, 04:57:48 pm
Sorry, I was speaking pseudo-code as I am not a HALbrain programmer.
Can you change: if InStr(1,OriginalSentence,"tea green")>0 then ...
to something like: //C code
string color; //global
bool ColorIn(string InS) {
  bool fnd=false;
  color="";
  if(!fnd) {color="red"; fnd=(InStr(1,InS,color));}
  ...
  if(!fnd) {color="blue"; fnd=(InStr(1,InS,color));}
  return fnd
}

and then:
if(ColorIn(OriginalSentence)) then {//process using the var color

  //the response string could be broken into smaller routines concatenated:
  GetResponse = OptS("Yes, ")+OptS("I see that ")+"it is a "+color+OptS(" color");
 
OptS would return its string 50% of the time.
Other routines could be, for instance:
string Agree() {
  case ..brain.Random(2) {
  1: return("yes");
  2: return("definitely");
 ...
}

I know this isn't a full answer, but I wanted you to think about deeper methods.  Best Wishes..

Title: Re: Hal to recognize colors plug in lightspeed idea 11-2-2012
Post by: lightspeed on November 16, 2012, 06:09:34 pm
thanks but i also need to know from cload if he's around or anyone that knows on my other question i asked earlier:


 i have forgotten on this  input question area does it alway's have to end with a question mark symbol?  is it necessary for it to work right?



ONE last thing would it be better for me to put the words example:  "blue color" or just the word "blue" ??
in the input area?