Monday 18 April 2011

robots and artificial intelligence

It has already been point out in earlier blogs (e.g 

Developing problem-solving teaching materials based upon Microsoft Robotics Studio and Problem-solving and robots ) that robots and problem-solving are a go well together. What about advanced problem-solving techniques such as artificial intelligence, do simple lego robots go well with these as a way of developing student's skills?


In my opinion it is a yes. As a part of a set of tools I have found them very useful for teaching the principles of simple neurones.

 Example code:
import josx.platform.rcx.*;

public class annlf{
 public static void main(String[] args)
 {
  int w[][] ={//put weights here};
  int o[]={1,1};
  int s1,s2,res1,res2;
  int sensor1=0,sensor2=0;
  robot_1 tom=new robot_1();
  Sensor.S1.activate();
  Sensor.S3.activate();
  for(;;){
   sensor1=Sensor.S1.readValue();
   sensor2=Sensor.S3.readValue();
   LCD.showNumber(sensor1);
   if (sensor1<42)
    s1=1;
   else
    s1=0;
   if (sensor2<42)
    s2=1;
   else
    s2=0;
   res1=w[0][1]*s1+w[0][2]*s2+w[0][0];
   if (res1>=0)
    o[0]=1;
   else
    o[0]=0;
   res2=w[1][1]*s1+w[1][2]*s2+w[1][0];
   if (res2>=0)
    o[1]=1;
   else
    o[1]=0;
   if ((o[0]==1)&&(o[1]==1))
    tom.forward1(10);
   if ((o[0]==0)&&(o[1]==0))
    tom.backward1(20);
   if ((o[0]==1)&&(o[1]==0))
    tom.tlturn(20);
   if ((o[0]==0)&&(o[1]==1))
    tom.trturn(20);
   LCD.refresh();
  }
 }
}

The example code uses two neurones to produce a line follower. The nice thing about this though is it easy to adapted this for a single neuron or multiple neuron tasks. For more on this some examples can be found here.

The above approaches used the Mindstorms RCX robots but it can equally be done with the newer NXT robots


 


Friday 15 April 2011

website sustainability 1

Before starting to migrate the site from a hosted server to a Google sites, capturing the current web contents as static HTML has some benefits:
-Even though Google sites does allow for direct importing of HTML. HTML can be added to a Google Site.
-Provides all the images in one go.

Software selected for this job is the free software WinHTTrack Website Copier (http://www.httrack.com/). It is easy to install and use.

The currently free Dropbox  provides an alternative place to store a website. But only if we talking about static content (ie. content which is not changed dynamically by PHP, etc but is basically HTML). Dropbox provides a public folder which can be view by one with the appropriate link.

First we need to copy the site, so we have local copy on our own machine. This can be done using the method as an example shown in  the earlier blog entry Caught it.

Next, we need a Dropbox account. Go to www.dropbox.com and you should see the following:

Click on the download button and follow the instructions. You will need an email address. We actually on need the Typical setting.




This will add a piece of software to machine. With a little box icon at the bottom of your screen, if we click on this we see the files and folders in the dropbox, open the public folder, now.transfer files over to public folder

Go to the dropbox website and log-in

Then do

Step 2:  Right-click[control-click for a mac] this home page file, then choose Dropbox > Copy Public Link. This copies the Internet link to your file so that you can paste it somewhere else.


Example:http://dl.dropbox.com/u/25018391/index.html for the East Midlands Knowledge Network

For more details on webpage sustainability go to website sustainability.