Left Brain

Processing Chaos

Posted in Left Brain, Right Brain on March 17th, 2010 by Jordan – Be the first to comment

After reading the wonderful Chaos (James Gleik), I was inspired to pick up a copy of The Computational Beauty of Nature (Gary Flake) and explore chaotic computation for myself! My tool of choice was Processing, a simplified yet powerful programming language built on Java. Processing is great because it keeps your focus on the visual end result and the project at hand instead of the structure or beauty of code (which is a fine topic in and of itself!).

I began this endeavor by exploring the Mandelbrot set with Zlata over the MIT Spark weekend. In the wee hours of Sunday morning, the first grainy images of the Mandelbrot set came into view. Uplifted by this success, we toiled tirelessly to create a full color, zoomable, and downright awesome fractal generator.

One of the best renderings from our Mandelbrot generator.

View Demo

Adding color was one of the toughest challenges we encountered. The standard RGB color notation is great for most purposes, but it really does fall short for generating the spectrum. In order to more easily generate a smooth color spectrum, we switched the project to HSL color and were able to simply scale the “H” (hue) property with each point’s iteration count.

Another interesting problem which still exists as a “bug” in the demo applet above is the lower limit imposed by the floating point datatype. As you zoom in farther and farther, the coordinates shrink down to absurdly small and precise values. Eventually, the measly floating point becomes imprecise, and the display seems pixelated. An easy fix would be switching all datatypes to doubles or bignums, but that would just take too much effort. It works!

Next I tackled the Lorenz Attractor. One of many such “strange attractors” that visualize the changes in a dynamic system by plotting the system’s state in “system space.” In the case of the Lorenz Attractor, fluid convection is represented in 3-space by the following set of equations:
From hypertextbook.com:
dx/dt = σ(y − x)
dy/dt = ρx − y − xz
dz/dt = xy − βz

As stated above, “x” is the convective flow, “y” is the horizontal temperature distribution, and “z” is the vertical temperature distribution of the system. Curiously, the orbit of point (x,y,z) over time will not “settle down” or form a repetitious cycle given certain critical values for σ, ρ, and β. Instead, the orbit forms a magnificent, infinitely complex object known as a strange attractor.

The Lorenz Attractor

View Demo

Invited to NYCSEF final round!

Posted in Left Brain on March 11th, 2010 by Jordan – Comments Off

I just found out that my year long research project on the trends in Integrated Information in evolving neural networks has been accepted into the NYCSEF (New York City Science and Engineering Fair) final round at the Museum of Natural History.

The preliminary round took place last Sunday (3/7/10). This round included live, interrogation style judging by three separate judges. I am honored that they were impressed with my work.

A cell phone shot of me being interviewed by a student from S.I. Tech at NYCSEF.

Bresenham’s Line Algorithm

Posted in Left Brain on February 16th, 2010 by Jordan – Comments Off

Bresenham’s line algorithm is the best known way to render a continuous and straight line through a raster display. I started out allowing floating point operations, but quickly decided to implement the algorithm using only integers. I didn’t like the online explanations and tutorials of the algo, so I decided to write something that I conceptually understood. View my code here.

My algorithm works by increasing an “error” variable by y0 – y1 every iteration. Should the error ever rise above x0-x1, the error is decreased by x0 – x1 and the drawn Y value is increased by 1.

Rewriting Stuyvesant’s Computer Science Website

Posted in Left Brain on December 20th, 2009 by Jordan – Comments Off

I have been given the responsibility of redesigning and rewriting Stuyvesant High School’s computer science website (cs.stuy.edu).

We are leaning towards writing a bare-bones server using Python’s WSGI specification. The specifics are still being worked out, but this new web presence will need to:

  • Serve a “presentable” site to the public complete with teacher bios, course descriptions, syllabus, and possibly a calendar.
  • Serve special class pages with editable sections and some sort of source code browser to authenticated users.

Since every teacher at Stuy would rather edit files in Emacs than bother with a buggy AJAX admin interface, most configuration and static content will be kept in plain-text files. Again, the specifics have not been worked out. More to come!

Intel Submission: Observing Integrated Information in Evolving Neural Networks

Posted in Left Brain on December 20th, 2009 by Jordan – Comments Off

I have completed a research paper on the how integrated information behaves during artificial evolution of neural networks in Polyworld. Mad props to Virgil Griffith (with his integrated information calculator) and Larry Yeager (author of the aforementioned Polyworld) for their incredible insight and willingness to help out a mere high school student.

Download the full paper as PDF (400k)

Abstract:

Evolution has proven to be a wildly successful autonomous process for creating intelligent systems in the natural world and in simulation. Since the early 1960s, re- searchers have used artificial evolution to find ingenious and novel solutions to complex problems such as series prediction and flight control. Recently, artificial evolution has been applied to neural networks with the aim of evolving more robust artificial intel- ligence. Several metrics have been proposed to chart the emergence of intelligence in these evolved networks. This work analyzes the behavior of a new metric, integrated information (φ). Observed data is analyzed, interpreted, and compared to more con- ventional properties of the artificial neural network. The data analysis shows that φ increases over evolutionary time and is therefore promising as a heuristic measure.

Experimental Data:

Results from Integrated Information experiments. The data set includes anatomical neural network sampled from 5,202 Polyworldians, at death, from three genetically independent simulations. Each data point represents a 200 time step bin size. *First sample for which p < 0.01

Comparing Accelerometer and Wheel Encoder Data

Posted in Left Brain on December 17th, 2009 by Jordan – Comments Off

A necessary but mundane task of programming any vehicle’s autonomous drive system is filtering the noise out of encoder and accelerometer sensory data. To demonstrate the noisiness of our sensors to the rest of the FRC team, I decided to create visual aids using Microsoft Excel. The following graph shows both sets of data over time during smooth acceleration and deceleration.

Accelerometer and encoder data on progbot for a "smooth" driving trial.

Accelerometer and encoder data on progbot for a "smooth" driving trial.

Accelerometer and encoder data for a very rough trial with progbot. The wheels were slipping at points during this trial.

Accelerometer and encoder data for a very rough trial with progbot. The wheels were slipping at points during this trial.

Stuypulse Website (2008 PHP)

Posted in Left Brain on December 8th, 2009 by Jordan – Comments Off

After an entire christmas vacation’s worth of PHP and Javascript wrangling, Daryl and I finished the 2008 Stuypulse website!

Stuypulse 2008 Website Screenshot

Click to visit stuypulse.com

The new site contains a novel CMS developed from scratch. Using a seamless interface, team members can add and edit pages and subpages to an infinite depth, create and display custom “widgets” for both sidebars, and easily update header and footer information. Integration with our existing SMF forum login system means that team members can use their forum credentials to log into the CMS.

Web Job: Harvey Citron Enterprises

Posted in Left Brain, Right Brain on December 7th, 2009 by Jordan – Comments Off

Harvey Citron Enterprises Screenshot

Harvey Citron wanted a Flashy new site to show off his amazing custom guitars and basses. Keeping with the “film strip” design of his previous site, I created a general swf file that loads images dynamically from a MYSQL database. This is the first dynamic Flash app I have ever made.

I wrote a nifty little administrative interface that allows Harvey to add instruments, delete them, and modify them. He can also change any other static looking page on the site. No framework was used, just raw PHP.

Web Jobs: Janet Perr Design

Posted in Left Brain, Right Brain on December 7th, 2009 by Jordan – Comments Off

Janet Perr Screenshot

I have been maintaining my mother’s freelance web presence since 2002. The current iteration of her site(s) feature some statically loaded flash content and simple JavaScript rollovers.

Pointdrive for Desbot

Posted in Left Brain on December 7th, 2009 by Jordan – Comments Off

Pointdrive is a revolutionary control system developed by me and a small team of programmers for Stuyvesant FRC’s 2007-2008 season. The system includes a bezier curve interpreter (written in C) onboard the robot’s IFI PIC18 RC unit as well as an AdobeSVG file converter on the host PC. This novel system allows drivers to literally draw the desired autonomous drive routine atop a map of the competition field, greatly reducing pre-match glitches and debugging.