20time the 9th

I’ve made decent progress in the past few weeks, despite the onslaught of AP tests.

I have the basic architecture of the tic tac toe neural network code, and ended up settling on using a genetic algorithm to evolve it, and also coded that up. However, debugging neural nets is a pain, especially when you decide to use genetic algorithms (they take forever to improve), so I decided that I got what I wanted from the mini-project (the basic understanding of how neural nets work, and how to implement them), and set it aside for now to work on the actual final product. 

 

My final product is creating a neural network that generates music. I did some research, and it looks like LSTMs are my best bet. These are a type of recurrent neural network (RNN), where outputs at a certain time are fed back in for the next “iteration” of the network, so the network’s outputs at one time are dependent of those at previous times, which is necessary when you want to predict what the next note should be in a musical passage.

(^RNNs, the hidden state at time T-1 gets copied over to be plugged in for the hidden state at time T)

LSTMs, in particular, are capable of “remembering” information for long periods of time (that’s why they’re called Long Short Term Memory networks). LSTMs have been used frequently for generating text of a certain style (whether it be Shakespeare, or LaTeX syntax), but they can also be used for music generation, by converting a music file to text format, and plugging it in.

My goal for this week is to find a fast way to convert the music files to some text format (will probably be going with abc notation or some similar ASCII format), and also getting most of the LSTM coded. It’ll take a while for it to train (this guy  who used what he calls a Biaxial RNN to make music apparently paid money for Amazon’s webservices to run his network…) but I think it’ll be sufficient to have it train overnight for a few days. I am slightly concerned that, as I mentioned above, debugging will take a while (especially when it takes so long to see if the network actually improves). Hopefully that won’t be a problem. Also, I’m going to start setting up a website explaining how this, along with other machine learning algorithms, works.

The Last Mockingbird

Harper Lee did a really nice job with the ending. On Page 279, Scout recaps everything that happened over the past few years, but from Arthur Radley’s perspective.

Brief excerpts:

“It was fall, and his children fought on the sidewalk in front of Mrs. Dubose’s. The boy helped his sister to her feet and they made their way home. Fall, and his children trotted to and fro around the corner, the day’s woes and triumphs on their faces. They stopped at an oak tree, delighted, puzzled, and apprehensive. “

“Atticus was right. One time he said you never really know a man until you stand in his shoes and walk around in them. Just standing on the Radley porch was enough.”

The book often contrasted Jem’s newfound “maturity” with Scout’s naivety, but this quote demonstrates how much Scout has grown through the book. Before, Jem had to explain to her why she couldn’t brag about Atticus’s shooting abilities at school. But, later, she is able to understand that Boo Radley killed Mr. Ewell, and that they must conceal that with the lie that Mr. Ewell killed himself. Scout is able to put herself in Arthur Radley’s shoes, and understand his perspective, from the secret life she’s always been curious about.

I also found it interesting how, on page 278, Scout mentions, after walking Boo back to his house, “I never saw him again.” I would think that this might be the beginning of Boo’s return to society, but I suppose that might be against his brother’s wishes – and, as Jem noted, he wanted to stay inside, only coming out when his children needed him.

Through the several years, Jem evolved –  from a child, to a teen, and finally to a young adult. His core characteristics have been bravery and moral righteousness, though the latter sometimes came across as arrogance, especially in his interactions with Scout, in which Jem often tells her what she should do. However, near the end of the book, Scout notes that, “Jem was becoming almost as good as Atticus at making you feel right when things go wrong “ (pg 259). This shows that he is gradually moving away from that arrogance, and is getting better at empathizing with people.

Compared to the other characters, Jem was affected significantly by the Tom Robinson case, perhaps even more than Atticus was. He legitimately believed that the jury would evaluate the evidence just as Jem did, and make a decision in a manner he considered “fair”. Ong pg. 212, “It was Jem’s turn to cry. His face was streaked with angry tears as we made our way through the cheerful crowd. ‘It ain’t right, ‘ he muttered.” Having been raised by Atticus, and being around people like Miss Maudie, Jem was probably under the impression that more people were fair (availability heuristic type thing), i.e. evaluated evidence without regard to race – it came as a nasty shock to him that most people in the town didn’t think like he did. This came as a challenge to his innate sense of what is good. Previously, he alludes to the fact that he wants to become a lawyer, just like Atticus. I wonder if this’ll inspire further him to join Atticus in doing what the rest of the town is too afraid to do.

In class, we discussed who killed Bob Ewell. The general consensus was that it was Boo Radley. On page 276, Mr. Tate says, “Mr. Finch, taking the one man who’s done you and this town a great service an’ draggin’ him with his shy ways into the limelight – to me, that’s a sin. It’s a sin and I’m not about to have it on my head. If it was any other man it’d be different. But not this man, Mr. Finch.” The “shy ways” part really points to Boo, as opposed to, say, Jem. Furthermore, Atticus thanks Boo for his children before he leaves.

We also discussed why To Kill A Mockingbird is considered a “simple love story”. Some of us suggested that it showed how love was shown in many forms – between Atticus and his children, Scout and Dill, Atticus and Aunt Alexandra, Scout/Jem and Calpurnia, etc. But, also, the book could be considered a lovestory between Scout and Boo Radley. Scout is shown fantasizing about seeing him – “Maybe someday we would see him. I imagined how it would be: when it happened, he’d just be sitting in the swing when I came along. ‘Hidy do, Mr. Arthur.’ “ Much of her (and Jem and Dill’s) childhood is spent drawing him out of his house. And in the end, Boo saves her life. Ultimately, it’s Boo that teaches Scout true empathy, just as it was Mrs. Dubose that taught Jem empathy.

In our second discussion, we also introduced the ideas of William James’s  “On a certain blindness in human beings.” We’re blinded by feelings – whenever we evaluate something, the feeling it evokes dominates our judgement, perhaps afterwards we rationalize it with seemingly logical arguments. We’re also blinded by our inherently biased perspective in life – everything is juxtaposed with our own experiences and what we feel is important, making it difficult to truly empathize with others. To Kill a Mockingbird was narrated by a child, and, as Mr. Dolphus Raymond noted, “Because you’re children and you can understand.” As a child, Scout is more accepting and understanding of others. Furthermore, because of this fact, people like Boo and Mr. Raymond tend to be more open with them.

This blindness, however, permeated the society in several forms  – first, in the form of inaction. In HPMOR, Professor Quirrell mentions, “When you are older, you will learn that the first and foremost thing which any ordinary person does is nothing.” This is especially true in Maycomb, where the citizens depend on Atticus to do what is right. Whether they subscribe to the Jim Crow ideas ingrained in society, or live in fear of breaching that very code, they rationalize their lack of action or advocacy in racism in some way, that is likely not consistent with their morals. Even today, James’s blindness persists. Perhaps it’s even become enhanced, as our lives become more well-documented with the rise of social media, and it becomes ever-important to shield yourself with a facade as you become visible to millions of others, making true empathy a difficult task.

Mockingbirds #2

Throughout chapters 10 to 14, inclusive, in Harper Lee’s To Kill A Mockingbird, I found Atticus’s character intriguing. He seems uncommonly sane, especially in the way he handles Jem and Scout (e.g. keeping certain aspects of himself hidden from them, having Jem read to Mrs. Dubose, etc.) This is further shown in his insistence of defending an African American as a lawyer, despite the negative response to that move. This section also revealed the meaning of the title, on page 90: “Mockingbirds don’t do one thing but make music for us to enjoy. They don’t eat up people’s gardens, don’t nest in corncribs, they don’t do one thing but sing their hearts out for us. That’s why it’s a sin to kill a mockingbird.”

Jem experiences a lot of growth in these few chapters, and his maturity is reflected in his ability to understand events that his sister fails to be moved by. For instance, on page 98, after learning that their father was the “deadest shot in Maycomb county”, Scout is eager to have something to tell her schoolmates about her father, but Jem stops her, realizing that Atticus probably had his reasons for keeping that to himself. And later on, after Atticus forces him to read to Mrs. Dubose for a month, and learns of her condition, he begins to empathize with her, understanding how brave she actually was. This is shown in the last sentences of part 2: “ “Jem picked up the candy box and threw it in the fire. He picked up the camellia, and when I went off to bed, I saw him fingering the wide petals.” (The camellia was sent to Jem by Mrs. Dubose, shortly before she died.)

But, despite his shows of maturity, he is still a pubescent pre-teen, and starts to grow distant from Scout (pg 135, “he was positively allergic to my [Scout’s] presence in public”), and he also grows arrogant in thinking himself more adult-like, which was shown by his revealing Dill to Atticus, when he was trying to remain hidden. Also, on page 99, Jem says, “Atticus is a gentleman, just like me!” This seems to imply that Jem looks up to Atticus, “gentleman” perhaps referring to Atticus’s ability to uphold his morals, and his uncommon sanity in a town of many lacking in that area. The latter part refers to Jem’s belief that he, too, knows what is right, and is demonstrated by the many times he tries to tell Scout what to do.

In class, our discussion brought up the Mockingbird quote at the beginning, and some suggested it might refer to African Americans, who weren’t harmful to anyone, yet were looked down upon by some in the town. This might also refer to Boo Radley, who, while he did actually harm someone, seemed to be trying to connect with the outside world in a positive manner (giving Scout the blanket), but was constantly thwarted by his brother. Also, Boo Radley’s character hasn’t played much of a role in these chapters, I wonder if he will return? Dill is back, after all, but Jem will likely choose not to partake in any of Dill’s Boo Radley schemes. We also discussed Atticus’s character in Chapter 10. In the beginning, he was emphasized as feeble and old, yet it was revealed that he had a talent in shooting. Scout is impressed by this, and wished to share this knowledge with her schoolmates. However, we came to the conclusion that Atticus likely kept this hidden from them to separate the ideas of strength and courage from a man with a gun. I think Jem recognized this lesson, with his ending comment on Atticus being a gentleman, recognizing Atticus’s mental fortitude, especially concerning his sense of righteousness.

I am curious, however – the mockingbird quote is definitely foreshadowing, and I think it might relate to Jem’s broken arm. But will Jem be contributing to killing the “mockingbird”, or protecting it? Also, will Jem continue to look up to his father as a gentlemen, or might his arrogance grow to the point that he starts to contradict Atticus?

 

20Time Week #8

This week I started working on the neural network for playing Tic-Tac-Toe. I already have the basic structure from following the handwriting recognition neuralnet from the textbook, so now I’m trying to figure out a good way to train the network. Through research and thinking, I’ve found several approaches – having the network play against a perfect tic-tac-toe AI (I made one from compsci class that I can use), creating all possible configurations and optimal moves, and training the network until it chooses those moves – but these, while technically using a neural network, basically have it copying an existing method. I was thinking of having a population of neural networks and evolving them with a genetic algorithm, but am still thinking of a good metric of “fitness” (how good each neural network is). I think I’ll be able to finish this in the next few days, and then I’ll decide on the final project, which will be tackling a harder problem…which I have yet to decide.

Ah, so we also have to write up a research paper on this project. I had several driving questions for it from week 4: “How do machines learn? What role do humans have in an increasingly automated society? What is intelligence?” The overarching theme of the paper will be the rising presence and future implications of AI within society, and what it means for us to be intelligent. There is a surprisingly large amount of information on this topic, because it’s such a new field that is so powerful. In fact, this video just got released today, and I eagerly await waitbutwhy’s post on Elon Musk’s new company Neuralink, which will be released this week.