Answers.Body: <p>I don't have a lot of insight into your overall problem, but there is a resource you might consider. </p>
  
  <p>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. </p>
  
  <p>The game is available (Java) in a couple of forms at the <a href="https://greenroom.greenfoot.org" rel="noreferrer">Greenroom</a>, a place for educators using <a href="https://www.greenfoot.org/door" rel="noreferrer">Greenfoot</a>. Membership is open to any interested teacher.</p>
  
  <p>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. </p>
  
  <p>It is, at best, a simple, even naive, introduction to machine learning.  </p>
  
  <p>Disclaimer: I'm not associated with Greenfoot or the Greenroom. </p>
  
  <hr>
  
  <p>The game is also discussed with code in <a href="http://rads.stackoverflow.com/amzn/click/0985154306" rel="noreferrer">Beyond Karel J Robot</a> though that book probably isn't a good resource for your class. </p>
  
  <p>Another user here (@Ben_I.) points to <a href="http://www.huffmancoding.com/code/fmg/" rel="noreferrer">an applet version</a> with a brief explanation of the game.  </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T17:21:30.883Z
Answers.Text: Is [this](http://www.huffmancoding.com/code/fmg/) the game to which you are referring?
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T17:26:54.467Z
Answers.Text: Yes. Thanks. I hadn't seen that reference. Source (Java) can be found at the Greenroom.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T18:57:42.570Z
Answers.Text: I can't upvote yet, it appears, but I would if I could!  Looking into that now...
Answers.UserDisplayName: Dave I
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T19:00:50.673Z
Answers.Text: @DaveI you need a bit more rep to vote.
Answers.UserDisplayName: Buffy
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T16:46:45.660Z
Answers.LastActivityDate: 2017-07-10T18:34:45.387Z
Answers.LastEditDate: 2017-07-10T18:34:45.387Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>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. </p>
  
  <p>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.</p>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>If you want more detail about any of these, I'd be glad to share my experiences and more details. </p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T21:40:21.793Z
Answers.Text: I love #1. Could you expand a bit (or give a link) for #s 2 and 3? I am having trouble following.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T21:30:28.637Z
Answers.Text: 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.
Answers.UserDisplayName: Dave I
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T20:34:12.023Z
Answers.LastActivityDate: 2017-07-10T20:34:12.023Z
Answers.UserDisplayName: Ray
Answers.Body: <p>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.</p>
  
  <p>The later chapters of Daniel Shiffman's <em>The Nature of Code</em>, especially <a href="http://natureofcode.com/book/chapter-9-the-evolution-of-code/" rel="nofollow noreferrer">Chapter 9. The Evolution of Code</a>, is a great resource for basic AI principles based in biological principles.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-16T20:40:59.437Z
Answers.Text: Nice answer. Welcome to [cseducators.se]!
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-19T21:45:00.663Z
Answers.Text: I came here to recommend The Nature of Code myself. +1
Answers.UserDisplayName: Kevin Workman
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-16T20:24:32.787Z
Answers.LastActivityDate: 2017-07-16T20:24:32.787Z
Answers.UserDisplayName: Soupy
Answers.Body: <p>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 <a href="https://twitter.com/maggielistens" rel="nofollow noreferrer">@maggielistens</a>, you'll see what I mean. This program uses a version of an old program from the 60s called <em>Eliza</em>. 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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-11T01:04:51.197Z
Answers.Text: 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
Answers.UserDisplayName: ivanivan
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-10T20:54:52.620Z
Answers.LastActivityDate: 2017-07-10T20:54:52.620Z
Answers.UserDisplayName: Edwin Torres
Body: <p>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.  </p>
  
  <p>I probably can't fit it all in, and I don't want to make it so difficult as to be discouraging.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T17:20:05.387Z
Comments.Text: Welcome to [cseducators.se].  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](https://chat.stackexchange.com/rooms/59174/the-classroom) if you have any questions. Glad to have you aboard, and I hope we hear more from you in the future!
Comments.UserDisplayName: Ben I.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T17:22:45.773Z
Comments.Text: 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!
Comments.UserDisplayName: Dave I
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T17:31:51.440Z
Comments.Text: 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.
Comments.UserDisplayName: Kaneki
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-10T18:42:21.413Z
Comments.Text: Maybe you could ask them to "train" a team of "Robocup 2D Soccer"...
Comments.UserDisplayName: Nuno Gil Fonseca
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-11T16:27:09.473Z
Comments.Text: @Kaneki as this is for middle schoolers, it would have to be mostly the former, with possible simple implementation projects of very simple concepts.  For example, a Markov chain would be something these kids would only understand with difficulty.
Comments.UserDisplayName: Dave I
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-07-16T20:33:31.663Z
Comments.Text: Numerical optimization, in particular Newton's method, should be taught before ANN and AI.  By 7th grade, most students should have enough development to understand 1-D Newton's method (even if it terms of a line's slope, $m$, rather than the point-value of the derivative, $x'{\equiv}{\left.\frac{\text{d}f\left(x\right)}{\text{d}x}\right|}_{x_0}$), so that seems like a great time to teach it!
Comments.UserDisplayName: Nat
Tags: <curriculum-design><lesson-ideas>
Title: What would be reasonable to include in an Introduction to AI class for a 7th-8th grade after school program?
ThreadText: # What would be reasonable to include in an Introduction to AI class for a 7th-8th grade after school program?
  
  (Asked by: username_0 on 2017-07-10)
  
  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.
  
  **Tags:** curriculum-design, lesson-ideas
  
  > **Comments:**
  > **username_1**: Welcome to [cseducators.se].  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](https://chat.stackexchange.com/rooms/59174/the-classroom) if you have any questions. Glad to have you aboard, and I hope we hear more from you in the future!  
  > **username_0**: 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!  
  > **username_2**: 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.  
  > **username_3**: Maybe you could ask them to "train" a team of "Robocup 2D Soccer"...  
  > **username_0**: @username_2 as this is for middle schoolers, it would have to be mostly the former, with possible simple implementation projects of very simple concepts.  For example, a Markov chain would be something these kids would only understand with difficulty.  
  > **username_4**: Numerical optimization, in particular Newton's method, should be taught before ANN and AI.  By 7th grade, most students should have enough development to understand 1-D Newton's method (even if it terms of a line's slope, $m$, rather than the point-value of the derivative, $x'{\equiv}{\left.\frac{\text{d}f\left(x\right)}{\text{d}x}\right|}_{x_0}$), so that seems like a great time to teach it!  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_5 on 2017-07-10. Score: 6
  
  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](https://greenroom.greenfoot.org), a place for educators using [Greenfoot](https://www.greenfoot.org/door). 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](http://rads.stackoverflow.com/amzn/click/0985154306) though that book probably isn't a good resource for your class.
  
  Another user here (@Ben\_I.) points to [an applet version](http://www.huffmancoding.com/code/fmg/) with a brief explanation of the game.
  
  > **Comments:**
  > **username_1**: Is [this](http://www.huffmancoding.com/code/fmg/) the game to which you are referring?  
  > **username_5**: Yes. Thanks. I hadn't seen that reference. Source (Java) can be found at the Greenroom.  
  > **username_0**: I can't upvote yet, it appears, but I would if I could!  Looking into that now...  
  > **username_5**: @username_0 you need a bit more rep to vote.  
  
  ---
  
  ### Answer by username_6 on 2017-07-10. Score: 4
  
  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.
  
  > **Comments:**
  > **username_1**: I love #1. Could you expand a bit (or give a link) for #s 2 and 3? I am having trouble following.  
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_7 on 2017-07-16. Score: 4
  
  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](http://natureofcode.com/book/chapter-9-the-evolution-of-code/), is a great resource for basic AI principles based in biological principles.
  
  > **Comments:**
  > **username_1**: Nice answer. Welcome to [cseducators.se]!  
  > **username_8**: I came here to recommend The Nature of Code myself. +1  
  
  ---
  
  ### Answer by username_9 on 2017-07-10. Score: 4
  
  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](https://twitter.com/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.
  
  > **Comments:**
  > **username_10**: 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  
  
  ---
  
  