Working with the Pathfinder example for the Windows Phone 7

Just how real is Artificial Intelligence?  Ha Ha.  Gotcha.  Artificial Intelligence is real, the artificial is that the intelligence in software is not wetware, but rather in hardware.  So the wetware defines the nature of hardware.  Yep, because I can walk over to the wall and unplug the hardware.  There are a few devices that I can’t do that to, most of them are Martian Probes or planetary probes.  Everything else, if it makes me angry then I can turn it off.  Think of Artificial Intelligence as hardware that has common sense.  In the previous blog post, I

Keep in mind: No HAL 9000 computer has ever made a mistake

Right, that is because the HAL 9000 computer never existed.  S

Our pathfinder program, does exist.

How do we interact with the pathfinder program.  What is artificial intelligence? 

First off, we have to make some modifications to the XML files that are used by the program to receive data from the outside world. 

You need to start the project from either File-Open Project

image 

Or (this saves a click)

image

Navigate to where you unzipped the pathfinder, locate the “solution” file, not the “project” file.  image

If you selected the solution file, you will see this.  The fully outdented items (replace the word with Windows if you are doing the Windows form of the application)

  • Pathfinding (Phone)
  • Pathfinding (Content)
  • PathfindingData
  • PathfindingData (Phone)

image

Locate the file: Map1.xml, this is the file that we are looking for.  If you modify this file you will also modify the program.  Double click on the Map1.XML file and make a few changes:

Note that the avatar (in my case Santa Claus, but on yours if you are using the PathFinder with no modifications, it is a small tank)

image

<!--Comments Starts
     For the exercise, modify
     The line with <Start> in it
     From
     0 0
     To
     0 1
     Then run the program-->
  <Asset Type="PathfindingData.MapData">
      <NumberRows>5</NumberRows>
      <NumberColumns>5</NumberColumns>
  <Start>0 0</Start>
  <End>4 4</End>
  <Barriers>
    2 0
    2 1
    2 2
    4 1
    4 2
  4 3
  </Barriers>
  </Asset>
</XnaContent>

Now run the program, your avatar should now be in a new location:

image 

In my next blog we will discuss error messages that you might run into when you make changes and how you can insure your end user never sees a useless error message.

NNNN