10
$\begingroup$

The class meets just 8 times for 2.5 hours weekly, aimed at 7-8th graders with very basic programming skills. Possibilities off the top of my head: computer learning (neural nets and/or genetic algorithms), constraint/logic based programming (well, it came out of AI, right?), a Brief History of AI, and/or basic game states and alpha-beta pruning.

I probably can't fit it all in, and I don't want to make it so difficult as to be discouraging.

$\endgroup$
  • 1
    $\begingroup$ Welcome to Computer Science Educators. This is a nice first question. Given the nature of the question, you may want to put in a little bit more about their background to get more targeted answers. Also, check out the chat room if you have any questions. Glad to have you aboard, and I hope we hear more from you in the future! $\endgroup$ – Ben I. Jul 10 '17 at 17:20
  • $\begingroup$ Sadly I cannot say any more about their background, since I don't know yet who my students will be, or even how many. :) But I'll fill in more detail as it is revealed to me! $\endgroup$ – Dave I Jul 10 '17 at 17:22
  • $\begingroup$ What is the purpose of these meetings? When you say introduction to AI, do you want to show AI at work or behind the scenes of AI? The former is for everyone, while the latter requires University level linear algebra, calculus and statistics. $\endgroup$ – Kaneki Jul 10 '17 at 17:31
  • $\begingroup$ Maybe you could ask them to "train" a team of "Robocup 2D Soccer"... $\endgroup$ – Nuno Gil Fonseca Jul 10 '17 at 18:42
  • 1
    $\begingroup$ I was only a year older when I developed an AI for connect 4 on my own. Never was able to beat it either. It was just a simple look ahead and rank possible branches AI algorithm. Not sure if it has a real name. $\endgroup$ – aidan.plenert.macdonald Jul 10 '17 at 23:11
6
$\begingroup$

I don't have a lot of insight into your overall problem, but there is a resource you might consider.

There is a simple game, The French Military Game, in which a person plays against the computer. The totality of game information is small enough that the computer can remember every position in every game played, so it doesn't make the same mistakes in subsequent games. While it is a known win for the human player, after 6 or so plays it is very difficult to beat the computer.

The game is available (Java) in a couple of forms at the Greenroom, a place for educators using Greenfoot. Membership is open to any interested teacher.

The FMG once appeared in Creative Computing, now defunct, as an Apple II BASIC game. It uses a bit of math, but ok at the level you are interested in.

It is, at best, a simple, even naive, introduction to machine learning.

Disclaimer: I'm not associated with Greenfoot or the Greenroom.


The game is also discussed with code in Beyond Karel J Robot though that book probably isn't a good resource for your class.

Another user here (@Ben_I.) points to an applet version with a brief explanation of the game.

$\endgroup$
  • 1
    $\begingroup$ Is this the game to which you are referring? $\endgroup$ – Ben I. Jul 10 '17 at 17:21
  • $\begingroup$ Yes. Thanks. I hadn't seen that reference. Source (Java) can be found at the Greenroom. $\endgroup$ – Buffy Jul 10 '17 at 17:26
  • $\begingroup$ I can't upvote yet, it appears, but I would if I could! Looking into that now... $\endgroup$ – Dave I Jul 10 '17 at 18:57
  • $\begingroup$ @DaveI you need a bit more rep to vote. $\endgroup$ – Buffy Jul 10 '17 at 19:00
4
$\begingroup$

I'll share a few things that I have done in the past to expose students to interesting AI topics without having them write working programs.

1.) To discuss expert systems and rules-based systems, have the students write out a list of rules (their best strategy) for playing tic-tac-toe (or another simple game that they should all be able to play well). After finishing their own set of rules, have them swap with a partner and attempt to lose, but still following the rules that were handed to them. This exercise has shown the difficulty in creating expert systems and exposes that we have so many assumptions that we don't realize.

2.) I really like Reinforcement Learning and created an activity where students are given a simple two-player game in which one student plays against the learning agent. The learning agent starts off choosing between actions with equal probability of selection. After a game is won or lost, the probabilities for actions taken that game or increased or decreased respectively. I implement this by using sets of colored tokens that can be removed or added to. For this activity to work, the game was be brief; the one I created never has more than 3 moves for the RL agent, it can only visit 14 possible states. I print out each of these states and tape the pictures to 14 different cups. The legal actions are color-coded with the colored tokens in the cups.

3.) Ant Colony Optimization is interesting and accessible. I'll show pictures from Marco Dorigo's experiments with actual ants and bridges. We'll discuss the concept of minimal spanning trees and some real world applications for them. The I'll end up using an online ant colony simulator.

If you want more detail about any of these, I'd be glad to share my experiences and more details.

If you're looking specifically for something they can program that exhibits intelligent behavior, you'll be extremely limited. One option might be an accessible robot kit (Mindstorms, etc) and have students work on obstacle avoidance, color detection, etc.

$\endgroup$
  • 1
    $\begingroup$ I love #1. Could you expand a bit (or give a link) for #s 2 and 3? I am having trouble following. $\endgroup$ – Ben I. Jul 10 '17 at 21:40
  • $\begingroup$ These activities look very intriguing but I think I'd need a little more detail to understand how it would work in the classroom. I'll check around google but any details you could provide about your learning agent in number 2 or the actual ant colony simulator you are referring to, that would be very helpful. $\endgroup$ – Dave I Jul 11 '17 at 21:30
4
$\begingroup$

I built a light but fun AI project using the Twitter developer API and a simple Python program to bring my dog Maggie to Twitter. If you send a direct message to @maggielistens, you'll see what I mean. This program uses a version of an old program from the 60s called Eliza. It acts like a therapist by responding to your commments and questions. It uses regular expressions and text replacement to appear like a real person. It won't pass the Turing Test, but it's a fun way to get students interested in AI and programming.

$\endgroup$
  • 1
    $\begingroup$ Yes, looking at an Eliza-type program's source could be very informative. Get one in the right language and have the students extend it and add new behavior/responses/triggers $\endgroup$ – ivanivan Jul 11 '17 at 1:04
4
$\begingroup$

I would recommend at least teaching genetic algorithm techniques. The basic principles of heredity, mutation, and selection is fairly easy to grasp, and the ability to watch the intermediate steps between the first iteration and the last can be fascinating to watch. Building the DNA portion of the code requires some intuition though, so problems have to be picked carefully.

The later chapters of Daniel Shiffman's The Nature of Code, especially Chapter 9. The Evolution of Code, is a great resource for basic AI principles based in biological principles.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.