Creating An Algorithm for creating an algorithm within an app

Link to app Code.org - App Lab

On “AlgorithmPage” This student wants to the following to occur
example
“A” & “B” are inputted by buttons in the app. Then “steal” is inputted - to signify that when A & B were clicked, a runner stole a base.

Another set of Letters were inputted, say “A” & “D” and another runner stole - which is inputted in the app

Different letters are pressed and “STEAL” as well as other letter combinations being pressed and “NO STEAL”

The student - and I, for the purpose of learning - would like to know how to get the inputted data to accumulate someplace AND be able to predict “STEAL” or “NO STEAL” based on future inputted data. For example, after a couple of innings, I input “C”, “B”, “E” and the app automatically gives the predicted “STEAL” or “No Steal” based on prior selections.

So far, I do not know what to try. Not sure where exactly to start. I would really like to know how this works so I can help further questions on alike matters. Eighth graders have some grand ambitions at times and I do not always have the tools to help those goals be reached.

Thanks for the help.

@chadwicko,

What I think you are trying to describe sounds like a form of artificial intelligence called “machine learning.”

Programming an App in App Lab to do that would be quite the challenge and I, too, wouldn’t quite know where to start as that is a pretty advanced form of programming and is beyond the scope of CS Discoveries. To give one example, this is the kind of process currently being used to train driverless cars where they use neural nets to “see” the world around the car and train the car what to avoid and how to drive safely.

Currently, code.org has an activity that I use with my students to teach the concept here: http://code.org/oceans

They are also working right now on an Artificial Intelligence Unit that should come out sometime later this year. I don’t think it will teach students how to make their own machine learning programs, but it should be interesting when it is ready.

Sorry if this doesn’t answer your real question. If anyone else has some ideas on this, please chime in. It does go beyond the scope of what students are expected to do in this class, and in this case, I believe it goes beyond the scope of the HS CSP course as well.

Very cool prototype, though!

Mike

1 Like

They are also working right now on an Artificial Intelligence Unit that should come out sometime later this year. I don’t think it will teach students how to make their own machine learning programs, but it should be interesting when it is ready.

We’ve got some pretty fun stuff up our sleeves for this new unit - y’all will have to wait and see =)

In the meantime, this project sounds similar to another project I saw at the Computer Science Teachers Association conference a few years ago - Number Guess. In this program, the computer guesses the next number in a pattern based on previous data. This project uses Scratch, but the algorithm and concept is the same - making a prediction based on past data. There are lots of student & teacher resources - maybe look through those and see if you can adapt them for App Lab?

Cheers,
Dan
Code Curriculum Writer

2 Likes

Thank you so much.

I have another student who has a plan and has tried a couple things. However, where she is stuck is assigning a numerical value to check boxes, which then send that value to another box for adding. Then the total would be added together and sent to a label? in another screen. She wrote a description in the app, but is not sure how to assign numbers to the check boxes, nor how to make such numbers go to a (variable?) box. Any thoughts at all on what to try would be great.

(Code.org - App Lab)

Dan, this sounds pretty exciting as well as engaging for my 7th and 8th grade students. Thanks

This looks like an app similar to the one they introduce in the last few chapters of Unit 15 in the CSD curriculum.

Here’s a link to the “Vacation Recommendation App” where the idea is that by clicking on different things you like, you create a score that is used to tell you where you should go on vacation.

I’ll bet if your student analyzes this app, they would be able to figure out how to create something similar, even if they use checkboxes instead of buttons.

Mike

As I was saying the idea in my head, I kept thinking “What is this similar to?” Thank you so much for your help. I will let you know how it goes.