Archive for the ‘education’ Category

Another Week Finished

Friday, September 26th, 2008

So, I finished up the week with another hike up the Reservoir, we started at around 3:00 PM, it was bright, sunny and hot. We went past the second reservoir to the first “fire pit” and had lunch. We then continued going towards Limbah Loop as the clouds rolled in and dusk settled. It was absolutely gorgeous. On our way down, we once again saw a huge number of crows cawing and heading to roost in the mountains for the night. It was eerily beautiful.

We also saw a bunch of ducks in the reservior (six in total). Slowly swimming around and feeding. There’s so much wildlife so close to the city, it’s really amazing.

Well, I once again run into my classic problem when it comes to academics, I have too many things I want to do :(. So far I’m thinking my possible thesis topics are thus:

  • Computer Enhanced Autodidactic learning systems. That is, using the computer to teach subjects (language, natural science, physics, programming, mathematics) in an autodidactic manner. Possible ways of doing this would be to create a eToys equivalent for python (related to this previous blog post) or enhance something like mnemosyne for broader use. Another option would be to study the effects of using a tool in mnemosyne in a learning environment (freshmen in college).
  • Static Type Analysis/Contracts for Python. Adding contracts or static type analysis to Python would be useful, but I don’t think it’s really unique enough for a master’s thesis. JITs for Python kinda fall into the same thing, I could do a project/thesis on it, maybe I should send some feelers out to the PyPy community?
  • Something involving Bayesian Inference — perhaps this could be used in one of the other ones…Can’t really think of something *specific* to do with this.
  • Genetic algorithms/programming use to solve physical engineering problems. This interests me a lot at the moment, I want to make a genetic algorithm to solve a Fantastic Contraption type game. I also think it’d be cool to have a genetic algorithm design fuselages (and wings) for aircraft…perhaps UAV project? (It may also be interesting to try to generate designs for “real” mechanical for something like reprap if I can figure out a good way to constrain it to manufacturable designs.)

Space Invaders!

Sunday, July 29th, 2007

Here’s the space invaders type game, like I promised :)

Ryan

from livewires import *

SCREEN_WIDTH = 640
SCREEN_HEIGHT = 480

def drawplayer(x,y):
    """This function draws the player at the position x y, modify this to
    change how the player looks."""
    return circle(x,y,r=10,filled=1)

def drawenemy(x,y):
    """This function draws enemies at the position x y, modify this to change
    you the enemies look."""
    return box(x-5,y-5,x+5,y+5,colour=Colour.red,filled=1)

enemy_x = 40
enemy_y = 400

begin_graphics(width=SCREEN_WIDTH,height=SCREEN_HEIGHT,title="Game")
allow_moveables()

# This is all the stuff that happens before we begin the game.
player = drawplayer(40, 40)
enemy = drawenemy(enemy_x, enemy_y)
direction = 'right'

# Begin the game.
while True:
    keys = keys_pressed()
    if 'x1b' in keys:
        break
    if '4' in keys:
        move_by(player, -10, 0)
    elif '6' in keys:
        move_by(player, 10, 0)

    if enemy_x < SCREEN_WIDTH-10 and direction == 'right':
        move_by(enemy, 5, 0)
        enemy_x += 5
    elif enemy_x > 10 and direction == 'left':
        move_by(enemy, -5, 0)
        enemy_x -= 5
    else:
        if direction == 'right':
            direction = 'left'
        else:
            direction = 'right'

    sleep(0.1)

end_graphics()

Blender Game engine tutorial

Sunday, July 15th, 2007

Alrighty, so it’s time to learn how to use the blender game engine. First we’re going to use the links here as a starting point.

We’ll also be doing some programming with livewire, since 2D is much easier than 3D, to start out with.

First, lets look to see what blender knows about objects in the game:

Game Engine Documentation

Now, here’s an example of what we can do with what blender knows:

Blender Scripting tutorial

So, we can access the properties of any object in the blender game engine, along with the sensors and actuators. The script is run in the game main loop automatically by blender, so we don’t have to worry about that.

Programming in livewires

To start off with, we need to installl pygame and livewires on your windows machine.

Lets start out working in the interactive interpreter provided by IDLE. So lets do a quick demo of what you can do.

from livewires import *
begin_graphics()
circle(200, 200, 50)

This has drown a circle at those coordinate within the window. This PDF contains other information that you may need to do stuff with livewire and graphics. Other PDFs on the livewires library are available here.

First we’ll just get used to drawing with livewires, then we’ll be able to make a game that takes user input.

Mr. Rogers isn’t what’s wrong with America

Thursday, July 12th, 2007

There recently have been a few stories about how Mr. Rogers has ruined American culture by telling children that they’re special. That’s right, we better not tell children that they are unique, self-actualized, worthy humans, capable and deserving of receiving love, or else, heaven forbid, they’ll ask for extra credit in college if they have a bad grade.

They claim that Mr. Rogers encourages a culture that ‘coddles’ children, and that this, along with allowing children to call adults by their first names, will lead to the collapse of Western Civilization, or finance professors actually having to talk to their students in a cordial manner, the article wasn’t really specific. I guess putting large economic, social, and behavioral expectations on children is coddling, nevermind medicating them into a stupor, diagnosing them with false mental illnesses and giving them stress disorders.

I think a much more dangerous cultural feature is that we’ve trained children that they cannot control how they perform, that they are born with specific intelligences and abilities that cannot be improved. This is very different than telling children that they are special and worthy. What I remember about Mr. Rogers the most is how he’d often talk about emotional issues that children had, in a calm, very rational way. Worthiness is not the same as entitlement. The difference between entitlement and worthiness is the difference between being selfish and being self-assured. Of being kind, or sucking up. Only a bitter, spiteful person would confuse the virtue with the vice.