AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

My little chatbot project…
 
 
  [ # 121 ]

Hi,
I’m reading an AI book this week. I got to the section on logic and now I’ve had a revelation with Walter and the “Where are you?” question.

Currently, the code iterates through all known areas and determines which one contains Walter.  The name of the area is then output in a response.

What it should do….
Walter does not know where he is.  Areas with names are loaded along with unique objects such as water falls, restroom, picnic table, etc.  As Walter explores he sees objects.  He scans the list of areas and based upon what he sees, he concludes a location.

It is possible that two areas contain similar items. In this case it is necessary to include a ‘confidence’ level. In some cases, the name of an area might not be loaded and Walter asks the human for clarification.

That’s my revelation. Need to think about this code design.

Regards,
Chuck

 

 
  [ # 122 ]

Wow! NINE pages already! Good stuff!

@Chuck

Can I borrow that book when you’re done? smile Seriously, I think that one of the many things that I need to add to my ToDo list is to bone up on AI basics, in general, and explore neural networks, specifically. This is the direction that I want to eventually take Morti in, in the future, but I need a much greater array of knowledge than I currently possess.

I think your progress with Walter is terrific. Your work and progress inspires me. Other than catching and correcting bugs in his interface, and pointing up his responses, I’m pretty well done with Morti until I can lay the foundation for his next phase. In all honesty, I’m not even certain what this “next phase” will be yet. That’s part of what I need to learn.

In another tangent, that “notepad” app I mentioned earlier has shaped up well, and I’m finding it very useful. If anyone is interested, I’ll create an installer for it, and upload it to my website.

 

 
  [ # 123 ]

*Update*

I’ve created a CDialog class to auto log conversations between myself and Walter.  Decided to work on creating string utilities tonight that are not supported by standard C++.  I’ve built several of them that I can put to use.

I’m taking a break and then I’m going to work on a math word converter. For example forty-seven is translated to 47.

Dave, what notepad app do you mean?  I’ve been using Notepad++ for over a year.

Regards,
Chuck

 

 
  [ # 124 ]

This is not a text editor, per se. What this application is for is to be available on my screen at any given moment, to be a place for me to quickly and easily jot down anything that comes to mind, so that I’m not cluttering up my desk any more with bits and scraps of paper.

The app has multiple tabs that can be easily edited, added to, or deleted. Each tab is a separate text field that contains whatever notes, thoughts, code snippets, or whatever else you need to keep n a handy place. When not “in focus”, it snaps into a tiny rectangle in the upper left corner of the screen. It’s always on top of other apps, so it never gets lost. I find it quite handy. I still have a few features that I want to add, but as it sits now, it’s pretty nice.

I’ve used NotePad+ (not ++) before, and hear that the ++ version makes for a nice code editor for a lot of coding languages, including PHP. But I’m more or less enamored of WeBuilder, which is the program I use for designing my web pages and other coding (except for VB, that is).

 

 
  [ # 125 ]
Dave Morton - Jul 18, 2010:

... I’ve taken to having a graph-paper tablet next to my desk, to write down things that I think of that need to be taken care of. Too bad the silly thing lies there, mostly unused. It takes more discipline than I currently have to make use of the notepad. Perhaps I need an on-screen “sticky-pad”, to type out my notes, rather than taking the time to stop what I’m doing, get the pad, and write things down. But, then again, that’s another of those dratted “tangents”, isn’t it?

This is what I was referring to, Chuck. smile

 

 
  [ # 126 ]

Dave,
I see…  What format do you use to save the notes?

*Update*
THINKING…Walter has a thinking thread.  I’ve done some thinking of my own to get my head around this concept. Here’s what I’ve concluded.

The thinking thread evaluates CATS (my acronym).
* Conversation with the human (current and past conversations)
* Activity - current task (e.g. working, playing, etc.)
* Topics - these are topics stored in memory (e.g. baseball, gardening, botany)
* Self - physical and emotional needs (e.g. hunger, sleepiness)

The thread scans a list of CATS items and identifies the most important needs.  For example, activities during working hours have a high score. However, a physical injury takes high precedence. 

The point is that the bot thinks through all the actions to satisfy the needs.

For example: Walter is hungry. So, the thought process is like this…

* I’m hungry.
* Where is the nearest food supply?
* What is the best way to get there?
* Do I need money to buy the food?
* What if the food is not there?

If the usual paths to follow don’t satisfy the need for hunger Walter becomes desperate. He might decide stealing is a viable option.

Anyway, this is my first attempt to define thinking at a 10,000 foot level.

Regards,
Chuck

 

 
  [ # 127 ]

*Update*

Here’s the latest version of the program spec. It’s a high-level design at the moment (29 pages). As the project develops I’ll add more detail describing the program. Normally, details are included up front…however since I have no idea what I’m doing I’ll save that for later.

http://www.chuckbolin.com/walter/spec.pdf

Regards,
Chuck

 

 
  [ # 128 ]

Hey, Chuck.

I’m going to be busier than usual the next day or so, so I won’t be able to get to reading the spec sheet till the weekend.

As to the file format of the saved notes, it’s just a plain text format, but with an extension of .note, saved in the “Application Data” tree of the OS directory structure. Unfortunately, I’m having a bit of trouble with creating the install file (setup projects are a pain to those of us who are too “old school” for our own good), but I’ll get that worked out soon enough. Once I do, I’ll post a link to the installer. The app is one of my best efforts, if I do say so myself. smile It’s still in development, and I already find it extremely useful.

 

 
  [ # 129 ]

Now there’s an idea. Have Morti keep track of all your notes smile

 

 
  [ # 130 ]
Chuck Bolin - Jul 22, 2010:

Dave,
* I’m hungry.
* Where is the nearest food supply?
* What is the best way to get there?
* Do I need money to buy the food?
* What if the food is not there?

Very good, so will I be able to ask Walter:  Where are you going? He will reply,X, then I can ask Why are you going there? or What for? or just Why? He will reply, to get food.  Then I can say, “That’s a long way, there is a food supply much closer, at the xxxx”.  Then he may say, hum, yes, but I do not like bannas very much, I like water melon much better, but thanks for the tip.  Is that the kind of functionality that you are aiming for?  The discussion based on his thinking and goals, sub-goals, etc?

 

 
  [ # 131 ]

@Roy

Although that may be a good idea at some later point in time, (say, about the same time that he’s able to bring me coffee in the morning), I think I’ll leave the two projects separate for now. smile

I got the issues sorted out with the installer, but I want to verify that it works on other platforms (e.g. Vista/7) before I deploy it. I expect no problems, but I don’t want to take chances. Best to have just Mom’s desktop fry, than ho have everyone else’s do so. smile

 

 
  [ # 132 ]

Very good, so will I be able to ask Walter:  Where are you going? He will reply,X, then I can ask Why are you going there? or What for? or just Why? He will reply, to get food.  Then I can say, “That’s a long way, there is a food supply much closer, at the xxxx”.  Then he may say, hum, yes, but I do not like bannas very much, I like water melon much better, but thanks for the tip.  Is that the kind of functionality that you are aiming for?  The discussion based on his thinking and goals, sub-goals, etc?

My plan is for the thinking (goals and sub-goals) to drive the conversation.

In this conversation, food has a couple of characteristics: nutritional value and pleasure to eat.  Walter needs a mechanism so that when a certain food comes to mind his desired is influenced…and a craving results in his thinking. At the same time, if you are a stranger, Walter needs to question your ‘intentions’. He needs to decide if your counsel can be trusted.

I’m spending time thinking about the underlying meaning and human reaction of conversation.

*Update*
I spent last night sketching out the math part of Walter’s thinking.  I don’t want him to operate like a computer but more human.  The math or number related goals are:

* Operate on 3 numbers or variables.
* Perform 2 operations.
* Store an intermediate and final result.
* Handle units of measurement (numerator/denominator).
* Convert values from one unit to another.
* Obfuscate precise responses
* Interpret number words.

I’ll add this to the spec tonight.

Regards,
Chuck

 

 
  [ # 133 ]

I have a function that I wrote in PHP to fill out payroll receipts that takes any currency formatted string (e.g. $243.56) and re-formats it into it’s lexical equivalent (e.g. two-hundred forty-three dollars and fifty-six cents). I’ll see if I can find it, and post the code here. I’m sure that transcoding it to C won’t be a chore. Or, at least, much of one. smile

[edit] Well, I forgot that I had changed it to keep the cents portion in numeric format as a fraction of a dollar. Oops? [/edit]

 

 
  [ # 134 ]

I found the function, and as promised, here it is:

$digitsArray = array(
                
0  => "Zero",
                
1  => "One",
                
2  => "Two",
                
3  => "Three",
                
4  => "Four",
                
5  => "Five",
                
6  => "Six",
                
7  => "Seven",
                
8  => "Eight",
                
9  => "Nine"
               
);
$teensArray = array(
                
1  => "Eleven",
                
2  => "Twelve",
                
3  => "Thirteen",
                
4  => "Fourteen",
                
5  => "Fifteen",
                
6  => "Sixteen",
                
7  => "Seventeen",
                
8  => "Eightteen",
                
9  => "Nineteen",
               );
$tensArray = array(
                   
1  => "Ten",
                   
2  => "Twenty",
                   
3  => "Thirty",
                   
4  => "Forty",
                   
5  => "Fifty",
                   
6  => "Sixty",
                   
7  => "Seventy",
                   
8  => "Eightty",
                   
9  => "Ninety",
                  );

  function 
makeDollars($in{
    
global $digitsArray$teensArray$tensArray;
    
$out "";
    
$thou intval($in 1000);
    
$rem $in - ($thou 1000);
    
$hund intval($rem 100);
    
$rem $rem - ($hund 100);
    
$tens intval($rem 10);
    
$rem $rem - ($tens 10);
    
$ones intval($rem);
    
$cents round((($rem $ones) * 100), 0);

    if (
$thou 0{
      $out 
.= "$digitsArray[$thou] Thousand ";
    
}
    
if ($hund 0{
        $out 
.= "$digitsArray[$hund] Hundred ";
    
}
    
if ($tens 1{
      
switch ($ones{
        
case 0:
          
$out .= "$tensArray[$tens] ";
          break;
        default:
          
$out .= "$tensArray[$tens]-$digitsArray[$ones] ";
          break;
      
}
    }
    
if ($tens == 1{
      
switch ($ones{
        
case 0:
          
$out .= "Ten ";
          break;
        default:
          
$out .= "$teensArray[$ones] ";
          break;
      
}
    }
    
if ($cents 10{
     $cents 
"0$cents";
    
}
    $out 
.= "and $cents/100";
    return 
$out;

  

I’m reasonably certain that this should prove useful, even if that use is only to point out how NOT to do it. smile

 

 
  [ # 135 ]

Hi Dave,
The function is exactly what I needed as a reference. Now you can provided me where you applied the text format and it is converted to a number. =) Thanks!!

*Update*
I’ve got a test C++ app I used for developing code. I’ve created a CMathFunction module that will manage all of Walter’s math capabilities. I can parse simple math expressions stored in a string.  I’ve got a lot of work to do on this.

I placed all of my string functions into a CStringUtility class. I’ve got a few other functions to create…after playing with the math module.

Regards,
Chuck

 

‹ First  < 7 8 9 10 11 >  Last ›
9 of 22
 
  login or register to react