First off, I can’t believe that my three-week EPGY Artificial Intelligence course is almost over. The time flew by so fast that it still feels like I arrived at Stanford yesterday! Okay, yesterday is a bit of an exaggeration (a week seems more accurate). The point is that I had a lot of fun expanding my knowledge of artificial intelligence and hanging out with such an awesome, diverse group of people for part of this summer! Here’s a brief summary of m
Most memorable moments: Writing the code that enabled my and Arkojit’s swarms to attack each other; almost getting EPGY Author to work; playing lots of poker, speed, and other card games; talking for hours to my roommates and new friends
Most important lessons: Java graphics; Markov chains; swarm algorithms; and learning what living away from home is like
Favorite activities: Playing cards; flounging (fountain lounging); local excursions; and, of course, programming
What I want to accomplish: 1 year–finish the litzing component of the Pre-Shortzian Puzzle Project, do well on the SAT and AP tests, continue to program and construct/edit crosswords; 3 years–go to a good college, start a major in computer science, continue crossword-related activities; 5-7 years–graduate from college, pursue a more advanced degree and/or work for a major tech company; life–become New York Times crossword puzzle editor, work for a major tech company (or do a start-up?), get married and have kids
At the California Academy of Sciences.
I played around with the logic programming languages Prolog and ASP, the former of which wouldn’t run on my computer because of a missing Java plug-in. Nevertheless, by verifying my code with a fellow EPGY camper, I was able to determine that it worked. Since the code for both programs and output for the second program are so short, I pasted it into this post rather than creating a new PasteBin account and putting it there.
In logic programming, all events happen at once. It seems that declarations must be processed slightly before rules, though.
Dining Hall Problem in Prolog
softserve(I) :- flavor(I).
Family Members in ASP
mother(X,Y) :- parent(X,Y), female(X).
father(X,Y) :- parent(X,Y), male(X).
female(karen). male(paul). male(david).
parent(karen, david). parent(paul, david).
Output for Family Members
smodels version 2.33. Reading...done
Stable Model: parent(paul,david) parent(karen,david) male(david) male(paul) female(karen) father(paul,david) mother(karen,david)
Number of choice points: 0
Number of wrong choices: 0
Number of atoms: 8
Number of rules: 7
Number of picked atoms: 0
Number of forced atoms: 0
Number of truth assignments: 7
Size of searchspace (removed): 0 (0)
I read two articles, a letter by Bill Gates and a piece in favor of free software, to help me form an opinion on the open-source vs. closed-source software debate. Both pieces raised important points, but I ultimately agree with Bill Gates that software shouldn’t be free unless the developer is okay with it. Software developers spend hours and hours coding their applications–they deserve whatever (often rather minimal) royalties that they make. I do believe, however, that users who pay for a piece of software should be free to tweak the code as they see fit, as long as they don’t sell slight modifications for their own benefits. This feels unfair and should be illegal.
On another note, my EPGY class has recently been discussing what exactly an operating system is. I personally define an operating system as the bridge between humans and hardware. It allows for anyone (not just the tech-savvy) to interact with computers efficiently. Below is a picture of some low-tech windows:
Image courtesy of Cornerstone Exteriors.
Comparing autonomy and agency is similar to comparing a thermometer to a thermostat. A thermometer is only capable of adjusting itself to changing conditions–it has no control over its external environment. Similarly, autonomous systems are controlled by pre-programmed functions. I have autonomy when I go to school since I don’t control the curriculum. A thermostat, however, is designed to regulate temperature. Computers have agency when they “think” and “learn” for themselves; I have agency when I’m constructing crossword puzzles since the process is very creative and somewhat unpredictable. Below is a picture of a thermometer:
Image courtesy of iTunes.
Arkojit and I have been busy polishing up our code to make bugs attack each other, which proved to be quite challenging. This post is a rough draft of what we’ll be doing. Arkojit and I decided that we don’t need any books to help with our project–none of the swarm algorithm books we saw on Amazon.com seemed to directly relate to our project, and they all are rather expensive.
Swarm intelligence in the programming sense was first introduced in 1989 by Gerardo Beni and Jing Wang. However, the idea of swarm intelligence can be traced back to science-fiction author Olaf Stapledon’s 1931 book Last and First Men.
Swarm algorithms have many applications. In nature, swarms enable tiny insects like ants to transport large objects. In programming, swarm algorithms have been used for ant-based routing, crowd simulation, art, and simulations.
Arkojit and I will add more options for the bugs, such as reproduction. Also, we plan on including obstacles in the environment.
I was researching swarming algorithm conferences and came across one that piqued my interest. The Fourth International Conference on Swarm Intelligence (IC-SI) spanned from June 12-15, 2013, and took place in Harbin, China. Fun-sounding topics included Artificial Bee Colony Algorithms, Swarm Robotics, and Evolutionary Programming, the latter of which I’m most interested in. Below is a photo of the conference logo:
Image courtesy of IC-SI.
If a random person asked me what AI is, I would tell him/her that there isn’t a single “correct” definition. Accepted definitions of this term are constantly changing. I personally think that AI involves a computer “thinking” or “learning” for itself–one of my favorite examples is the crossword solver Dr. Fill (https://www.jair.org/media/3437/live-3437-6039-jair.pdf). I don’t believe something with a billion if/else statements can be considered AI since a human has already thought through every case.
There is a very fine line between algorithms and AI–the difference is that algorithms entail formulas that computers follow while AI entails computer thinking and learning. Here’s the link to some proofs I constructed with LaTeX, a handy tool I learned how to use today:
I just read an article about surveillance that argued how having a constant recording of our actions (via Google glass or a similar technology) could help administer justice but could also end up invading our privacy. I agree that surveillance technology would help convict criminals more accurately, though I feel that it would ultimately backfire. First of all, people could hire hackers to change their surveillance footage. Second, having constant recordings may take up more space than we can accommodate. Third, constant recordings impinge on privacy and the freedom that the Constitution promises. Finally, like in Nineteen Eighty-Four, an omnipotent dictator would almost certainly take unfair advantage of this system. Below is a picture of propaganda for Big Brother, the dictator in Nineteen Eighty-Four:
Image courtesy of 4Rensic.
I learned about three different types of programming in my EPGY course: imperative, declarative, and functional. Imperative programming defines a series of commands for the computer to execute; declarative programming defines what a program should do without listing how to do it; functional programming is a subset of declarative programming that focuses on functions. LISP is a functional language that originated in 1958; its list-based structure makes it particularly useful in AI. Below is my first LISP program, which has addition, subtraction, multiplication, and factorial functions, along with test values for all of them.
(defun add(x y)
(+ x y))
(defun subtract(x y)
(- x y))
(defun multiply(x y)
(* x y))
(defun factorial (N)
(if (or (= N 0) (= N 1))
(* N (factorial(- N 1)))))
“Print results of program with test values”
(print(add 4 5))
(print(subtract 4 5))
(print(multiply 4 5))