A Knight to Remember

In Computer Science III, students taught by Roger Mayo are learning how to deal with boundaries and two-dimensional arrays. These students have to work with columns and rows and have to complete the top row to advance to the next row. They are not allowed to go back up, as the print will not allow them, but the program would end up crashing, too. In this instance, Mayo used a chess board and one piece, called the ‘knight,’ to teach this lesson on boundaries and implementation strategies. This class worked with their hands in real life first to figure out the ways they would program the ‘Knight’s Tour’ on the computer.

In chess, the knight can move only in the shape of an ‘L.’ Mayo uses this feature as a way to present to his class, called “The Knight’s Tour.” This is a lab where students have an eight by eight grid and a knight. There is a total of eight possible moves that the knight can make if it’s in the center. The goal of this lab was to reach and cover all sixty-four squares without going over any of the squares again. With this plan in mind, Mayo decided to put down numbers so that the students know where they have been and where they cannot go again.

After having done the lab, Mayo was then interviewed again.

“I had great expectations of what I thought they would get from the project,” Mayo explained. “And I felt like there were a lot of really good things that they learned about two dimensional arrays, but I don’t think it was as powerful of a lesson as I was hoping it would be.”

He believed he would do the lab again. His belief was based on how engaged the students were during the lab and how much fun they had as they were enjoying the process of learning about programming concepts.

“They had to implement something they haven’t thought of before,” Mayo said.

Senior Ricardo Lopez explained that he had done this lab prior to this current year, going on to say, “What I learned from the lab last year is how to handle the grid within coding. A grid is pretty simple for us in math, but trying to do something like that within coding tends to be a little more difficult to visualize, so it was interesting to be able to experience that and also to be able to apply it to things, too.

“…I found more, from an educators stand point, that hands on activities tend to be more helpful ’cause it seemed that, seeing how this could move on a grid in real life, like physically moving a knight across it’s tour, helps people understand… hands on activities tend to help people a lot more than simply just reading a page. I think, this year, a lot of people are getting it better and that they’ll be able to do better,” Lopez said.