Tuesday, September 1, 2015

Why you (Yes, you) should apply for the AiC Award.

This last fall, I had the chance to apply for something called the National Center for Women in Technology's Aspirations in Computing Award.  I learned about it at the National Girl Scouting Convention last year, while wandering around the convention floor . This award is for High School girls who are interested in computing, have pursued education or achievement in computing, and who want to connect with other girls who are interested in the same.

The requirements aren't restrictive: no matter how much experience you have, or what area of computing you're interested in,  you can definitely apply and still have a chance of winning. The big things the judges are looking for are passion and the drive to pursue it.  There are two levels of awards: regional, and national. National awardees and runner's ups get a scholarship, and all awardees get an award and recognition from NCWIT. The application requires you to talk about your plans for your future in computing, and how you want to achieve them, as well as supply an "educator's endorsement" that functions as a letter of recommendation.  I won a regional award and was a national runner's up this last year. As a result I got some nifty swag, and the opportunity to go to a regional awards ceremony with 11 or so other regional winners. These were some of the coolest people. I met other girls interested in programming, design, research, and so many other things. It was a great experience, lots of fun.

But by far the best part about the AIC awards is the wide range opportunities made available to the winners. For example, all awardees  gain access to a special Facebook page where they can discuss school, jobs, computing, and the world of technology. It's very active, and the people there are all kind and helpful. But in my opinion, the most important benefit that comes from the NCWIT awards are the networking opportunities. At the regional award ceremony, I met a girl who later invited me to join her FTC robotics team, the professor I worked with as a research intern at a university robotics lab over the summer, and the woman who helped me fund my school Makerspaces' Donorschoose project, getting us a 3D printer.

Applications open today, and close on October 26th this year. If you are in any way interested, I can't encourage you enough to look into it. It's an awesome opportunity,  an impressive resume builder, and there are many award winners each year from all different backgrounds. Be sure to take the next step toward fulfilling your aspirations today. 

Monday, August 31, 2015

Make your own Light up Shoes

Here's another good project for kids (or anyone, really) starting to learn about making with electricity. It's a good step up from the previous project I posted here, the Lightbulb Bauble. This project uses most of the same parts, but it's a step up in complexity, using parallel circuitry and a DIY pressure sensor to make the LEDs light up every time the wearer takes a step.

For this project, you'll need:
Lace-up Tennis Shoes
6 LED's with attached wires (or solder on your own)
An Index card
Aluminum Foil
Duct or Electrical Tape
1 Watch Battery
Index Card sized piece of Cardboard


The first step: if you have not yet attached wires to your LEDs, go ahead and do so. The wires should be about the distance from the eyelets closest to your toe on your shoes to your heel.




Next, you want to thread the ends of each LED through the eyelets of the shoe, and pull the wires toward the heel. Add as many as you like, though make sure that the shoe is still wearable.


To prepare the pressure sensor, fold your index card in half, and attach some foil to both sides of the inside.  Attach the wires from each LED to the foil - black (negative) to top, red (positive) to bottom. Then tape down the battery on one side so that when you close the index card, the foil only touches the battery. You may have to cover excess foil with tape. 


When the pressure sensor is closed, the circuit it completed, and the LEDs should light up!


To increase the durability of the design, fold a piece of cardboard in half, and glue your index card pressure sensor to the inside.


This is a great project to teach kids about parallel circuits. Ask them why a parallel circuit is necessary - what happens if the LEDs are wired in series? It also introduces the idea of an open/closed circuit. What other ways can a circuit be opened or closed? How do we use this in everyday life?
If you're interested in purchasing the materials to make this project, you can find my new store here. All proceeds go to supplying school STEM programs and Makerspaces with fun and educational resources. Have fun making!

Thursday, July 2, 2015

Can AI 'experience' emotion?

Emotions are often portrayed in sci-fi as the last realm of humans, the only aspect of thought unavailable to most machines. Think of Data’s long quest for emotional experience on Star Trek, or the hard questions faced by Decker in Do Androids Dream of Electric Sheep? (Or Blade Runner, if you're more a film person) . For all their apparent unmarred rationality in stories, robots in real life can’t seem to escape from the emotional attachments and influences of humans. From military troops mourning their lost mechanical comrades to apps like Siri that depend on conversational interaction, humans tend to anthropomorphize AI as having the same feelings they do to some extent. But when asked directly if a computer can have feelings, many people would argue no, because of the inherent rationality assumed of mechanical systems. Is it possible? Could AI ever feel emotion?




As humans, we define our emotions categorically - we feel happy, or sad, or angry, or so on.  How is “happy,” as a category containing who knows how many subcategories of semantics - pleased, content, euphoric - defined?  There are a few different ways you could approach a definition - 

Emotion as a pre-determined response - The way I feel after I get something I want is “happy.” 
Emotion as a physical state - Elevated serotonin and endocannabinoids are “happy.”
Emotion as derived from desire - Not needing or wanting to change anything about my current state is “happy.” 

Woman? Salad? Definitely happy.

To most people these definitions probably seem roundabout and strange. Humans have a unique gift of language that allows happiness to encompass all of these things, it’s typical definition boiling down to the abstract “feeling good.” But when exploring the concept of emotion in an artificial system, one without the convenient crutch of human consciousness and understanding, we have to look for more concrete rules. 

By using any of these definitions I’ve listed above, I’d argue that yes, an artificially intelligent system could feel emotion. It’d be easy for an event of lip a switch in an AI’s programming, setting “mood = ‘happy.’” Bit-and-byte facsimiles of the chemical changes in the human brain that correlate with emotional response would be simple to measure and categorize. And for a system that monitors its goals constantly, the third definition of emotion would be quite useful - I’m reminded of THIS STUDY, in which humans with a damaged center of emotion in their brain were rendered incapable of simple decisions like picking a pen to write with, because there was no “rational” distinction between the choices. Emotion could be defined in this way as a wash of small influences in each of our desires and decisions based on current circumstances. AI can have emotions defined in these ways. But, as I’m sure many of you are shouting at your computers right now, that’s not the real question. 

A better question is: Could AI ever experience emotion the same way that humans do? 


This is also a much harder question because we have no reference point. We don’t know what turns a chemical highway into an emotional experience for humans, but we can at least see the same correlation between stimulus in response in dogs, mice, apes, babies, etc. One prime example is the tongue-extended expression that comes with liking a taste - replicated by different species as an instinctive reaction that seems to prove that emotion is not a solely human experience. With AI, there’s no such connection. To assume any would be to anthropomorphize a machine to a dangerous extent. We can program the classification of emotion. We can program the physical qualities of emotion. We can program decisions and goals for an AI that rely on a self-perception of emotion. 

But can we program emotion itself? 
Or is it really necessary to? 

One of the beautiful things that comes from consciousness is the shared experience. We all agree that the sky is blue, the arctic is cold, and the live action Avatar the Last Airbender movie would’ve been terrible, had it ever been created. 

Really dodged a bullet there. 

Through language we are able to connect the personal to the universal in this way. But it’s a flawed system. There’s no way to prove, for example, that the blue I see is the same blue you see. Or that the happy I feel is the same one you do. Each of these things are entirely subjective, impossible to measure, and impossible to share without the shaping force of language. If the true, pure essence of my “happy” was your experience of “sad,” who would ever know? We could only define happiness in a truly universal manner as a measurable response, physical, behavioral, or cognitive, to whatever experiences we had shared. 


So it doesn’t matter whether the emotions an AI experiences are the same as ours, because we’d never know. It would only matter whether these objective, concrete definitions of emotion held true. These are the only things we can measure. Anything further is an argument on consciousness, humanity, and the ineffable, and their definitions, which have been debated for centuries. These concepts too will need concrete restrictions as AI becomes more and more prevalent in our human world. AI means a new era of philosophy in which questions are no longer enough. We can debate the existence of qualia or the Chinese Room experiment all day (and in a later post.) But beyond philosophical misgivings, does it matter if an AI’s blue is the same as yours, if you can both tell me the color of the sky? In such abstract terms, an AI can experience emotion - but only as much as we’re willing to attribute to it.

Questions? Comments? Arguments? Please add below,  I'd love to see what you have to say. 

Saturday, June 6, 2015

Makerspace: A Semester's Resource Masterpost


Overall my makerspace has had a great year. I't's gone by super fast - there's something to be said for just jumping in there, but there's a learning curve that can be a little hard to jump. So in case it can help anyone else, I'm going to write about some of the opportunities I've found and the stuff I've learned here!


FUNDING:



Codecademy, in a collaboration with Google and Donorschoose, offers codes worth $100 on a Donors Choose project to support a classroom program to every student who completes their tutorials through a school program. This is a great opportunity for ANY school Makerspace to get some funding while teaching kids about programming. Although the program advertises itself as solely for High Schools, there are options for all grades and schools, and it wasn't a problem for my middle schoolers. The program is closed for 2015 right now, but it pops back up annually, so watch that space!

I'm also going to be looking at the NCWIT AspireIt awards. I was a national runner up and regional winner this last year, which is how I learned about the opportunity (For other girls in high school or college - APPLY, APPLY, APPLY!)

Also, the teacher sponsoring my club was even able to set up a Donorschoose project, where we're trying to raise money to get a 3D printer for next year. If you want to fund the project, you can find a link here. If you're able to give support, any would be appreciated!

ACTIVITIES:



However, even though funding was limited, I was able to come up with ways to make the materials I DID have stretch, to groups ranging from a core group of about 20 students, to larger groups of up to 50-60 at one point. What I found worked really well was:

- Dividing the kids into groups, and assigning each group a different part of the activity. For example, I was able to spread my two Mindstorms kits across a large group by assigning each smaller group to build a certain part of the robot.

- Alternating activities between groups: While I was able to raise enough money with my earlier fundraiser to buy 15 Arduino Uno clones for the Makerspace, I was still limited in the number of computers we had to program them. To fix this problem, I divided the kids into two groups: one spent the first half of the time building circuits, and the other, programming. Then they switched, so everyone got a chance to try everything

-Large group discussion/brainstorming activities: During the weeks I was short on materials or planning time, I defaulted to activities that didn't need anything more than a pen and some paper, or computers. I took inspiration from a middle school SMU competition called Visioneering, which I participated in in the 7th and 8th grades. In the competition, teams of students are challenged to create plans for solving some problem with technology, no matter how expensive or "out there". For my adaptation, I had each table brainstorm a plan for improving the school using technology, which they had to share with a group at the end of the class period.

Those are just the ones that come to mind right now. Over the summer, I plan on putting together some guides to the various lessons/projects we did, and, ideally, I'll publish them somewhere online (though exactly where is TBD. I'll post a link here as soon as I figure it out).

PLANS:







For next year, I'm looking at trying to expand my program to merge with one at an existing elementary school in the area, though that plan is still very much in its "what if?" stage. I'll also have a chance to talk to the principal soon about getting the sorts of programs we'd need on the school computer. Plus, over the summer, I'll hopefully have a few more volunteers to assist me with planning meetings and keeping track of the budget. So overall, there's still a lot of work to be done, but I feel good about my plans as the next year comes around.

OTHER HELPFUL THINGS:

Don't be afraid to ask for help, information, or anything else from people who seem interested. You'd be surprised what you can learn.

Practice talking about your project. You should be able to give a compelling summary in 30 seconds.

The fancier the technology, the less time you'll have to do the activity (You have to account for the ooh-and-aahing).

If you're having fun, chances are everyone is.


Anyone have any comments, other suggestions, or anything to say? Please, comment below!


Thursday, April 16, 2015

The Importance of the Humanities in STEM

Let's start with an easy opinion to swallow:  The US has a problem with its STEM education. But not in the way you might think. The trouble with STEM in the US isn't that we rank low worldwide in math, or in science. It's that the money going toward improving those test scores is too often taken from the arts. And it shouldn't be. That might sound odd coming from me - the organizer of a STEM program that serves 50+ kids, as well as an engineer and programmer - but hear me out. It's not that I think STEM education is useless, or that we need to take resources away from science and technology classes. But too many schools teach STEM materials poorly, and at a much bigger cost than they realize.

In the digital age, we're hyperfocused on teaching math and science to "catch up" to countries like China and India in terms of scores on international exams. This emphasis on test scores has increased funding for STEM programs - great! Student interest can flourish. Teachers can get new technology for their classrooms. And where the funding is used to improve test scores, they improve. It's a win/win deal.   But that funding has to come from somewhere, and often it comes from budget cuts in the liberal arts and humanities. That is very, very bad.

Note: Not how the brain works. 

We seem to have this idea that STEM and the arts are two immutably separate entities. Just ask an engineering major what they think of the liberal arts at their university, or vice versa. It follows that they have to be in constant competition - one has to be more important. You can't have both science AND religion. You can't love both math AND painting. Maybe such a divide meant more when technology was factory machines and assembly lines, but the way we use technology has changed immensely even in the past few years. Supporters of STEM education often remind us that, in the future, every job from will require some knowledge of technology. But the reverse is also true: every worker in a STEM related field would benefit from the kind of education that comes with the arts. 

There's so much more to building, programming, and selling a computer than hardware specifications. A computer has to be used by humans, humans that bring their own aesthetic preferences, learning curves, and emotional pulls to the table. All of that has to be designed into the machine, and there's more to it than statistics. There's some psychology, some visual arts, maybe even some music or some writing. Computers are sold as lifestyles, not machines. And that' s not even counting the interpersonal skills the production team had to use to brainstorm, or the dozens of concept sketches and pitches created before the final design was chosen.  There's a creativity needed to get ahead in technology, and it doesn't come from the  skill set that makes kids better at taking math tests. But somehow, although the need for the humanities in technology becomes more prevalent every day, we've been devaluing the classes and the skills they give us. What can we gain from the humanities in STEM? And how can we make sure those skills aren't left out?



The best STEM class I ever took was a technology class taught by a middle school librarian. (I've mentioned it before, here.) She started the school's technology club the first year I attended - I was one of the founding members. In the club, we tried to finagle our favorite technologies into different parts of the school and curriculum. We taught the English and Social Studies teacher how to make Google Earth tours. We made videos for new students using editing programs and green screens. One member even designed a new website for the school. By the next year, the club has become a class, and one that was unique in two ways. One, we were working with people outside of the class and our experience with technology. Anything we created had to be presented in a way that was easy for anyone to understand and use. Two, our projects were working to solve real world problems, problems that required skills beyond just our programming expertise. 

So we wrote tutorials. We created animated sequences and music for the videos. We read books and drew pictures and argued over the latest technology news. We were able to use the skills we learned in our English, History, Art, and Music classes to augment our projects in the class. While I know the class wouldn't have worked for everyone,  many of the later engineering and science classes I took only focused on teaching the minimal technological  skills necessary for a basic concept. That's fine for a technology class. But those are skills you have to get somewhere. This only emphasizes the importance of Humanities focused classes in all student's education. Those classes are where students gain the skills needed to turn technology into real world solutions for real world people.

As I mentioned before, this is more important today than ever. Take a minute to watch these commercials :









Notice anything about these advertisements? They aren't selling their products based on how many processors they have, or how many transistors they can fit on a chip. They sell computers based on how people use them. And computers are used for so much more than pedigree STEM purposes. You need artists who can create programs for artists. You need historians. You need musicians. If for no other reason, you need art educated people to create the media you enjoy so much today. Every TV show, game, article and more you find online comes from arts education every bit as much as STEM.  Who'd want to live in a world without the art we love? How could we move forward without the art that has inspired us to create new things?

We play a dangerous game by ascribing innovation to the kinds of skills that can be measured by standardized tests. Support your local arts and humanities programs. Bring art into your STEM classes, and STEM into your art classes. Read, watch, create, and enjoy how the world you live in hasn't been created by opposing forces, but a beautiful mixture of every skill humanity has to offer. Push for access to education in each and every one. We've got to create a future that's worth the time we put into it. 


Tuesday, March 31, 2015

Review: How to Create a Mind by Ray Kurzweil

Hello again! Finally I can get back to business now that the Spring musical is over and most of the teachers have recovered from their post-break assignment panic. I read this book a few weeks ago, over my Spring break. It was an interesting book, though very different from Barrat's pessimistic analysis of the state of AI research.


In How to Create a Mind, Kurzweil focuses on trying to predict AI's next step through a mix of neuroscience, mathematical analysis, and philosophy. I picked this book over some of Kurzweil's more famous works, like The Singularity is Near, because I wanted something a little more technical than I assumed those books would be, and I wasn't disappointed.
But the great things about the book are: a) it's easy to read, and b.) fairly well cited. I've seen lots of criticism online about Kurzweil "dumbing down" the theories he talks about in the book, which range from discussions of Hidden Markov Models and the Pattern Recognition Theory of Mind,  to thought experiments like the Chinese Room. I think these critics miss the point of the book - it's not meant to be a textbook. It's meant for the masses, the people looking to understand more about AI and how it works, and in that respect it works very well.

I do have some doubts about Kurzweil's qualifications as a neuroscientist. (Not that I'm any more qualified.) He spends a good portion of the book talking about his Pattern Recognition Theory of Mind (PRTM), where he theorizes that the neocortex of the brain is made up of multi-neuron "pattern-recognizers" that are arranged hierarchally to allow for the recognition of more and more complex patters. Kurzweil does a LOT of guessing in these chapters, from the number of neurons in each pattern recognizers to how they would be structured in the brain, that he almost stipulates as fact. His explanation of the theory is convincing, at least to someone like me; Plus the inspiration has created several useful AI tools, such as the Hidden Markov Model and Hidden Temporal Model. But I'd have to do more of my own research to say anything substantial about the validity of the theory.
Kurzweil's thoughts on consciousness and the mind, the focus of the second half of the book, match up pretty well with my own, and I enjoyed reading his justifications for them. They make for good argument fodder, and, as I'm sure you know, argue I do. And more than anything else, this second half is a place of argument: Kurzweil goes out of his way to defend his predictions and disprove his detractors and their positions. In some cases it seems almost a little desperate, and one chapter late in the book becomes quite tedious as Kurzweil tries to defend his Singulatarian movement (On which my views haven't changed. See my review of Barrat's Our Final Invention).


But you shouldn't let this criticism stop you from checking out the book. It tends toward overstatement and futuristic optimism, but, so does Kurzweil. The information is well cited, inspiring, interesting, and a great base for further research. I would wholeheartedly recommend the book to anyone interested in AI - So long as they know nothing there, or anywhere else, is the final word.




Wednesday, February 25, 2015

AI and Tic-Tac-Toe -

If you've seen any of my posts in the past, you know about my clearly negligible interest in artificial intelligence. I also mentioned in my review of James Barrat's Our Final Invention that I wanted to take the next step, and bought myself an Artificial Intelligence Textbook at Half Price Books (this one, to be exact, although only the 2nd edition.) I'll be short about it - SO. COOL. I've talked my family's ears off about every chapter so far, which is about a third of the way through. However,  I have one major complaint about the textbook - it doesn't feature any actual programming exercises. It refers to possible problems to solve - games, like chess; mathematics problems and solving theorems; P vs NP problems; but the book doesn't offer any exercises that let you try out the methods for solving them in real time. And for me, that just isn't good enough.

So, I decided to take matters into my own hands, and try out the first problem mentioned by the book: Tic -Tac-Toe.

WARNING: THE FOLLOWING SECTION IS EDUCATIONAL, BUT ALSO REALLY LONG
SKIP TO THE PROGRAM PICTURES IF YOU JUST WANT TO HEAR ABOUT MY SOLUTION

The book uses Tic-Tac-Toe to introduce the concept of a heuristic search. A heuristic is a way of gauging whether or not a potential solution to a problem is a good one. For example, if you were trying to walk downtown in a foreign city, a good heuristic would be to take a path that goes toward the tall buildings. This might not always be a perfect method(some cities are more labyrinthian than others), but it will usually do a good job of finding a solution for your problem. Our thinking is completely tied up in heuristics - they're the rules you make up about how you run your life, whether it's how much money you save each month, or the lucky socks you wear to every test.

In the context of Artificial Intelligence, a heuristic search is one way a program can do its thinking.
Let's look at this in terms of Tic-Tac-Toe
The program looks at a problem as a series of states. These are possible states of a Tic-Tac-Toe problem.

Pretty simple, right? You can perform an action on a state to change it to another state - like making a move on the board. Now a solution to this particular type of problem is a progression of actions and states that ends in the program either getting a three-in-a-row, or tying with the opposite player - a "winning" state.

In order to find a solution, the program takes a state, performs an action on it to create a new state, and checks if it's a winning state. If it is, it returns the action it took. Otherwise, it tries a different action.

The most basic kind of thinking is trial-and-error. You generate a random possible action to solve a problem, and if it doesn't work, discard it and try another. This WILL get you a good solution... eventually. For small problems, this might not be an issue. But for big problems with millions upon billions of possible solutions, there's no way.



This is where the heuristic part comes in. I find it useful to imagine an AI as on a map, starting on a base state, with paths to every other possible state representing every possible action it could take. When the AI tries an action, it moves along the path to the new state, which has paths connecting to all of IT'S possible states, and so forth. And every state has an elevation - the higher up it is, the better is fits a heuristic (with the highest being winning states, of course). Your AI's goal then is to find the action from the state it's at that will get it to a higher state (one that better fits the heuristic).  This means a lot of heuristic search techniques have funny names like Hill Climbing. The program's  ultimate goal is to get to higher (or highest, when possible.) ground.

For example, your Tic-Tac-Toe playing program (assuming computer plays X) might decide that a good state is one that has the most possible, shortest paths to a winning state for X, or, in other words, the most rows, columns, and diagonals with only Xs in them. From a base state, a program with this heuristic will make a move in the middle space as it's action, because the state created is the "highest" state - it gives you 4 possible ways to win. It's the best possible action.

At this point it's important to note, however, that finding a best possible action isn't always possible - for problems where you can take a lot of different actions, it might take too much time. For problems where states can be far away from the winning state, you can get stuck on a 'ridge' or a 'plateau' where you've found the best possible state for your local area, but there's one much better many, many actions away. This is the reason heuristic search algorithms can get so complicated, and why so many different ones exist. AI's greatest achievement and it's greatest challenge is dealing with situations where 'best' isn't possible.

However, Tic-Tac-Toe is a relatively simple problem - one small enough that it COULD be solved through trial and error, we just want it to be solved faster. For my programs, I decided to combine two different heuristic techniques - Steep Ascent Hill Climbing and Minimaxing.

Steep Ascent Hill Climbing is a heuristic search method where you evaluate all the possible states you could reach from your given state and pick the best one. Because of this, it can take longer for your computer to complete than plain old vanilla hill climbing, which just finds any state that's better than the current one. But it will typically take fewer steps to get to a winning state, and, in the case of a game like Tic-Tac-Toe, a 'good' move really isn't good enough.



Minimaxing is a a method more specific to game theory. You assume that, for every move each player makes, they are going to try and maximize their own gains and minimize their own losses - while maximizing the losses and minimizing the gains for the opposing player. In true minimaxing, you estimate the number of moves it will take for you to win the game from a given state, and use that to assign the state a score. I combined this approach with a different heuristic to make my program as fast and effective as I could




 I actually built the first two iterations of this program back in mid-October, but I was then hit in quick succession with the Girl Scout National Convention and GSLI conference, my Gold Award Project, make-up work, then school, and it's just been crazy ever since.

The first draft took about a week to build.  I coded everything in Ruby.


Basically, the computer takes the tic tac toe board, uses is to test all the possible moves it can make, and picks the one that gets it the highest score. 

It played Tic Tac Toe, for sure! It just... didn't play very WELL. I used a heuristic that scored the board on the number of open rows, columns, and diagonals, but it just didn't give the weight needed to winning states. So I tried again.

I found a promising looking heuristic here. This one made use of an array to store all the possible ways to win, and another to score the state based on how many ways X and O can win on the board. But even better, I gave the computer the ability to look one move further ahead, and try to guess how the opponent would respond to its move.  This was minimaxing - the computer assumed the opposing player would play their best, and could then use its move to put the opponent in the worst possible position.

This program worked GREAT! It was almost unbeatable!

But, it had one weakness.



It could only look two moves ahead, and beating THIS trap required the program to look ahead 4.

In the end, I found it was easier to adjust my heuristic than to double up on the moves my program watched. I made sure it treated getting these traps - the three corners, or this triangle - as winning when scoring the boards, but NOT when checking for a win. In this way, the program finally worked.


Next, I'm working on trying to make a program that can learn the game on it's own from repeated trials - but that's a whole other ball game. For now, I'm just happy with how my first foray into AI programming worked out!

If you have questions/or comments don't hesitate to ask! I'm always happy for feedback.