• Skip to main content
  • Skip to footer

DrTechniko

Train Young Innovators Anywhere Anytime

  • Free Stories & Activities
  • Online Courses
  • Coaching & Workshops
  • Bio
  • Blog

education

April 6, 2024 By drtechniko

How To Train Your AI

Last week I was invited to teach a group of 9th graders on the topic of AI. There is a general concern in schools that kids avoid learning by using a GPT [OpenAI, Gemini, Copilot, etc.] to do their homework. But in my opinion, given that AI is now readily available more than ever, we should adjust how we engage the students and what assignments we give them. AI is a tool they should not shy away from. Or they will fall behind. But, they should also have the wisdom to know how to use it. Or they will not grow. So, instead of telling them what to do, I showed them the real deal so they can make their own conclusions. We built an AI together as I told them a story. I hope my account of this lesson helps school teachers come up with ideas for their own classrooms.

To engage the students, I picked "movies and tv shows" as my story theme. I considered several other candidates: from making soccer predictions to personalized shopping but I felt that movies are a great way to engage both boys and girls in middle school and early high school. Besides, I used to work at Netflix 🙂

The fictional story was simple: "I have a bunch of movies that I watched, some of them I liked and some I didn't. I want to build an AI to tell me which movies I will like next. And because I'm lazy, I will ask an AI to help me build my AI! And then I will tell you how that AI got me in trouble."

It's all about data

First, I introduced myself to the kids to give them some clues: where I grew up, where I lived, what I did for work, etc.

Then I asked them to guess my preferences.

They guessed all the movies correctly except "Mamma Mia!". They thought that since I grew up in Greece I would have liked it. (Sorry, kids. I like my beach and tzatziki without the love drama.)

Then I showed them how I organized all this into data I could feed into the Movie AI using a spreadsheet.

I explained to the students that in order for the AI to decide what types of movies I like we need to tell the AI more information about each movie. We create what we call "features" to organize the information. For example "Is the movie animated?" or "is it high budget"? One of the students asked me "how do you tell if it's a high budget movie?". Good question. It gave me the chance to explain that, as the designer of the AI, I got to choose how to define that. In my case, I decided to call it "high budget" if it cost more than $100M to make. I also need to "label" each movie with "like" (check the box) or "dislike" (uncheck the box). For the computer this means like = 1 and dislike = 0.

Making the AI

Then I exposed them to the real code I wrote together with the GPT AI!

Why did I decide to torture the poor students with complex python code? I just wanted them to see how real engineers work. I explained to them that they didn't need to understand the code. I would just explain the high level idea and then run it together.

But by showing them the code, I also had a hidden agenda...

The GPT AI that I used to generate the initial code for the project made a critical error. It literally generated code that reversed my labels: 1's for the movies I don't like and 0's for the ones I liked. So I removed that "dangerous" piece of code.

It also generated code that trained the model only once, without performing proper Cross Validation, which is not a best practice in general. I let that slide however. It wasn't a big deal for the demonstration.

But it gave me the opportunity to explain to the students that if I didn't know how the code worked and I trusted the AI 100% then I would be in a lot of trouble. Maybe not for movies, but what if I trained an AI used in an autonomous car and then the car crashed??

After this, we trained the model and I showed them how training an AI is basically trying to position a line in such a way that it splits my "likes" from "dislikes" the best way possible by reducing the error of its guesses. That's why I had to train it for 1000 epochs to get there.

I showed them this graph:

At the end, I asked them to guess what my AI was. Was it a smart robot? A sentient being? A digital brain? The Matrix? The students had no clue. So I told them it was nothing this fancy. It was just a bunch of numbers that can help me draw a line to divide my data into two groups. We call them weights and biases.

Something like that:

Having fun with the AI

After we trained the AI together we saw how well it predicted these new movies:

Pretty good!

So then I asked the students to hack my AI. How would we do that? By hacking my data of course!

So here is what they did:

After "uncheck Ready Player One" and "check Barbie", etc. they figured to just simply reverse my labels (as shown at the bottom of my list).

Smart hackers!

And after we retrained the AI we got this:

Naruto was the only one who (barely) survived. He is a persistent little ninja after all!

Next Steps

After the class, I worked with the school teacher on follow-up assignment ideas. Here are some:

  • Create a new data set that has a similar format to the Movies one where you have to make one of two choices. For example, sports. For soccer you can train an AI for a goalie: "Should I dive LEFT or RIGHT?" based on data from opponent shots where the features are "isRightFooted", "runsFast", "wideAngleLeft", etc?
    • The kids then can discuss their data sets with the teacher. They can talk about how to reduce bias in their data or how they could collect and label them.
  • Try to play with the code and relabel and retrain the model to see where the AI gets confused and see if you can add extra movie features in the Feature list (or more movies).

Reference Materials

If you need to recreate this experience in your class or you want to have a conversation with your child here are the materials I used:

  • Presentation
  • Spreadsheet with Data
  • Code on Google Colab

I hope we learned something useful today,

Filed Under: artificial intelligence, class, computer science, education, programming, technology Tagged With: artificial intelligence, education, technology

December 13, 2015 By drtechniko

How To Build A Simple Computer Out Of Anything

What is a computer?

A while ago I taught a group of 1st graders a class about computing. I wanted them to understand the concept of a computer in a simple and tangible way. So I came up with an activity where the kids would be able to build and test a simple computer anywhere: in the classroom, at home or at the playground.

Here is what I told them to do:

“Build a computer that can produce random numbers using anything you have at home.”

They go: “Really? We can use anything we like?”

And I go: “Yes. Anything you like. Except of course your mom’s or your dad’s computer. You can’t use a computer to build a computer. That would be cheating. You are also not allowed to generate the random numbers in your head. The computer must do that.”

And then they go: “What are random numbers?”

It took me a few cycles to recover from such a disarming question. I thought “Wow, the world around us is full of randomness (especially the computing world) yet how does one explain it to a six year-old?”

I said: “It’s numbers that are not in order. They are completely mixed up and you can’t guess which number comes next. Like when you throw a dice. Can you guess which number will come up when you throw a dice? No, right? That’s a random number.”

Solutions as surprising as a random number

The kids surprised me with their creativity. Here are some of their cool “computer” designs:

domarien-prng
Spin the wheel to get the next number. I love the added touch of fake buttons to make this look like a real computer!

Riley_s_random_number_computer__-_nikos_michalakis_gmail_com_-_Gmail
Stir the pot to shake the numbers and open it to pick the next one. Computing in the kitchen!

isabel-prng
Throw the dart-marker at the target and write down the number closest to the mark. I would have never thought of that one!

Surprised yet again

What’s more surprising than the creativity of the children is the lack of creativity of the adults. Having already seen what the kids came up with, I posed the same question when I interviewed a series of college students for a software engineering position. They were about to graduate from one of the top computer science programs in the US.

I asked the candidates:

“Design a computer for generating random numbers using anything found in this interview room.”

9 out of 10 of them gave me the same answer:

“I can do this by flipping a coin.”

And then I thought: “Should I tell them a 6 year-old can do better than that?”

What’s your design?

Does you kid have a cool design? Post a picture to the DrTechniko Facebook Page. I will personally respond to you.

I hope we learned something useful today,

DrTechniko

Filed Under: child, class, computer science, design Tagged With: children, education, first grade, teaching, technology

March 25, 2012 By drtechniko

Story 5 – The Rude Rollerball Pen

 

I’m a rollerball pen and I’m rude and so bored.

You must play with me. I will not be ignored.

You will draw me a circle inside a huge square

Or I’ll draw in your nose a long curly hair.


Time’s up!


What is this that you drew? Do you think I’m a fool?

Oh! You used a big Square and you drew a big pool

And you painted a Circle as a shiny red ball.

Not that bad. It’s because of my skill after all.

 

—-

 

I am a rollerball pen and I’m rude and need food.

I must eat something yummy or I’m up to no good.

You must feed me a Circle from out of a Square

Otherwise I will smudge lots of ink on your chair.

 

Time’s up!


Let me see what you drew now, you wily old fox.

Ha! You used a fat Square and you drew a fat box

And out of a Circle you made a sweet pie

It is mine! It’s all mine! There’s no need to ask why.

 

—-

 

I am a rollerball pen and I love to be rude.

So be nicer to me or I’ll paint in the nude.

You will cut me a Circle from the edge of a Square

Or I’ll pee on your clothes. You’ll have nothing to wear.

 

Time’s up!


Let me see! Let me see. Do we have matching styles?

So you used some flat Squares and you drew some flat tiles…

And then out of a Circle you made a deep sink?

That’s so rude! I am leaking! I ran out… of… ink…


Filed Under: child, comic, story Tagged With: children, creativity, education, innovation, kindergarten, learning, preschool, squares and circles, storytelling

July 15, 2011 By drtechniko

Online schooling: Should we offer it to children?

Last week I finished an online digital painting class at schoolism.com taught by the legendary Bobby Chiu. To show you how effective the class was, I learned how to turn this:

Into this:

And then into this!


All from the comfort of my home and time schedule using only Photoshop and a digital tablet.

I’m not a professional illustrator (yet), but I feel like I learned some amazing skills from a world expert on the subject and I felt like a kid having fun. So, I wondered “Could kids benefit from online schooling?”

So I thought of some benefits and drawbacks of online schooling compared to traditional schools:

Benefits:

  • Get to learn from world experts, homeworks included (e.g., schoolism.com, MIT OnlineCourseWare) no matter where you live.
  • Use superior interaction with content through technology (boardworks.co.uk).
  • Get help with Adaptive/Personalized learning (knewton.com).
  • Learn at your own pace and schedule.

(The online schools I include above do not target children per se, but I don’t see why their models couldn’t be adapted for children.)

Drawbacks:

  • Schools are not just about knowledge transfer, they ‘re also about making friends and getting exposed to the real world away from home.
  • It’s hard to enforce the “rules” when the teacher is not physically around.

As far as “enforcing rules”, a “virtual teacher” technology can easily be applied to record scores and progress as if the teacher was around (with deadlines, online testing etc.). So the most serious drawback of online schooling is the lack of the ability to socialize. Even though there are options that mimic social interaction online a la Facebook (schoology.com), unless kids leave home and meet other kids in person, they will miss out on a big part of life lessons if we replace schools with online learning.

So how about turning schools into “social activity centers” to get kids to play and interact together while they get schooled online? For the first time in history, we could give kids the opportunity (especially in developing countries) to get quality education from anywhere anytime at the fraction of the cost of traditional schools.

What do you think?

Filed Under: child, discussion, online learning, online schooling Tagged With: bobby chiu, child education, children, digital painting, education, kids, learning, online schools, schoolism, socializing, teaching, technology, virtual school, virtual teacher

July 9, 2011 By drtechniko

StoRy 4 – Discussion

Many times I’ve heard people ask first graders “what is your favorite class in school”. The child is forced to choose one subject: sports, math, language etc. That trend continues throughout school and students tend to become one-dimensional. Too much focus too early ends up hurting our problem solving skills, because we lose the opportunity to build extra thinking tools and models that can be composed together.

StoRy 4 illustrates that taking a step back, thinking outside the box and composing abilities can solve a problem even if it appears to be unsolvable. Not until the Number 4 and the Letter R realize they can combine their spelling and counting abilities can they figure out that R is the fourth letter in the word FOUR.

The story also introduces the array, a data structure that appears everywhere in science (especially in computer science). An array, is basically a list of items that can be identified by an index/position. In our story, the array is an array of characters (F-O-U-R), also known as a word.

Here are some comprehension questions you can ask your children:

Q: What is the 4th letter of the word LETTER? What’s the position of the letter B in the word NUMBER?
A: T. 4.

Q: What’s more useful: Counting or Spelling?
A: Both are equally useful.

Q: Why was the Number 4 smiling at the end?
A: Because at the end, FOUR had 4 boxes and R only 1 inside the crossword puzzle. Moreover, it was all because the Letter R jumped into the box thinking that this would make it win the argument against the Number 4. If the Letter R hadn’t jumped into the box, then the Number 4 would not appear in the crossword puzzle at all.

I hope we learned something useful today,
Dr. Techniko

Filed Under: discussion, science Tagged With: algorithms, children, education, first grade, preschool, problem solving, storytelling, teaching, technology

  • Go to page 1
  • Go to page 2
  • Go to page 3
  • Go to Next Page »

Footer

  • Facebook
  • Pinterest
  • Twitter

Copyright © 2025 DrTechniko · All Rights Reserved · Contact DrTechniko

 

Loading Comments...