Here is the improved program further.
[DOWNLOAD] Created Program 4(for the NXT software)
Do you see what exactly has been changed?
In fact, determination of black / white has been increased twice.
This will be the picture that shows the movement of the robot by using this program.
A red arrow is the movement looking for "black", a blue arrow is the movement looking for "white".
The last program was running "only one side" the boundaries of the black / white, this program has been run alternately as "both".
I thought,,, this way the moving speed goes up, so the distance can earn per proceed, the risk of off the track will be happened more (would jump out from the line).