Thursday, January 26, 2012

How to drive part 2: Car turning ramp radius

I used to think that when going around one of those curvy ramps I should stay on the outside. My reasoning was that the turn would be less sharp, and there would be less centrifugal force so I could still go fast without flipping over. However, I always wondered why turns felt smoother and better whenever I made really tight turns instead of wide turns.


After quick physics reasoning and a recall of a high school formula it becomes obvious that when turning one should stay on the INSIDE.


Centripetal force = (v^2) / r

Circle circumference = pi*2*r

velocity = distance / time


We are judging the viability of bigger vs smaller radius given that we complete a ramp/turn in the same amount of time. For example, if I go around the ramp choosing a wide turn in 20 seconds, vs going around the ramp choosing a tight turn in 20 seconds, which one puts less force on my car?


The tight turn has a smaller r, but also a smaller v. We know that as the r decreases, the v will decrease in a way linearly proportional to r because circumference is linearly proportional to radius, and velocity is linearly proportional to distance (given the same amount of time). But now as you can see from the top equation the v is SQUAREDLY proportional to my centripetal force whereas the r is only linearly proprtional to my centripetal force. Therefore even though the v and the r will decrease at the same rate as the circle gets tighter, that also means that the overall centripetal force is DECREASING as the circle gets tighter (because the v decreasing has a greater effect on the force's value than the r decreasing).


Therefore if you want to get somewhere quickly without flipping over your car the best way is to make a tight turn. Even though you can't go as fast on the turn, the smaller distance you have to cover more than makes up for it. If you take the same amount of time in boths situations, a tighter circle will put less force on your car. Similarly, if you keep constant the amount of force you put on your car in both situations, a tighter turn will be completed sooner.

If this proof is not well-written or needs clarification please let me know.

Wednesday, January 25, 2012

Dementor raped by Whomping Willow (literally!)

In the following dream a dementor is literally raped by a Whomping Willow tree.

I'm at some sort of LAN party and people are playing a free-for-all first-person shooter. So I get on my computer and connect into the game.


Suddenly I am walking through some dark scenery, with building rubble and leafless trees around me. It is more like real life than a game. A guy sprays a volley of bullets at me from out of nowhere, so I retreat through the opening a large half-destroyed stone building, while throwing 3-4 grenades in my wake to discouage pursuit.


As I walk over the rubble/rocks of this half-destroyed building I realize there are dementors flying around, circling the building. I realize that this end of the "map" is highly dangerous and that's why everyone is actually choosing to fight on the other side of the map, where there are Whomping Willows (it turns out that dementors are afraid of Whomping Willows). Since I'd rather die in a gunfight than I my life sucked out by a dementor, I start making my way back to where I came from while detonating some "dementor grenades" on myself along the way (they only affect dementors). The dementors are trying to get to me, but they are repelled each time I detonate a dementor grenade.


Finally I make it back to safety and stand under a protective Whomping Willow. Alas, they are not designed to last forever, and after being pulled by a dementor, the tree begins to drift off into the air as if in a zero-gravity environment! Fortunately there is another, bigger Whomping Willow nearby. So I go stand under that one. One ambitious dementor tries to dislodge this tree as well, but fails miserably. The tree secures its branches around the dementor and reels it in.


All of a sudden the dementor has inexplicably transformed into an orange dinosaur/giraffe and the Whomping Willow was raping it doggy style. This comforted me because it meant the dementor would be unable to attack us. Then I woke up.

The end. Please feel free to add your own Freudian analyses.



Friday, January 20, 2012

Extremely important potentially world-changing idea: Judo/BJJ Machine Learning

Anyone who has followed MMA or Brazilian Jiu-Jitsu now knows that often the best combat techniques are not readily apparent -- in fact some are downright ridiculous looking and counterintuitive. A good example that comes to mind is "inverted guard". It involves raising your legs over your head as if you were trying to suck your own dick and somehow using that to your advantage against your opponent. I had it done to me at a gym recently and it completely boggled my mind how easy it was for him to put me in the rear naked choke from that initially awkward position.


Then for some reason my mind wandered to computers and their abilities in human games. We know that Brazilian Jiu-Jitsu is a special martial art in that it is extremely analagous to chess (no really, I'm not trying to sound flowery; this is a well-documented and true analogy, as people who do both BJJ and chess will understand). We also know that COMPUTERS CAN BEAT HUMANS AT CHESS.


So I was wondering "maybe we can invent a robot with same weight and strength and test its intellect against the BJJ champion". But that's too difficult b/c of the material required. So then I thought, "what are the uses for keeping it all software, no hardware?" A simulation, of course!


Now the question is: How much more "weird shit" is there to discover? Maybe martial arts and MMA have evolved long enough for humans to basically discovered most of the best techniques to use -- triangle, kimura, armbar, etc. Then again, maybe not (inverted guard is probably rather recent)! So in order to discover these new techniques, should we just roll around and discover them ourselves? Should we let the masters discover it and have it trickle down to us? OR, the third option: by MACHING LEARNING.


This is what I propose:


1. Program in the physics, kinematics, rules of the game, and the human body as accurately as possible, down to joints at least as small as the wrist. This is probably the hardest part, and we will have to tweak it until it looks like real humanoid BJJ/Judo.

2. Create a "starting" artificial intelligence agent. This agent should have a lot of pre-programmed techniques (all known techniques) and should preferrably already be as good as a black belt in BJJ/Judo.

3. The game is basically the agents running "minimax" algorithm on each other to see what is the most likely way to "finish/checkmate" (submit) the opponent.

4. Run a ton of games, 1on1, with varying weights, reaches, and reaction times, and use GENETIC ALGORITHMS to select only the most intelligent players

5. Run it for a very long time, tweaking if necessary

6. Observe the playing style of the finished product and see if it is different from regular human black belt players!



Monday, December 5, 2011

The first nightmare I ever had (approx. 1995)

I was an innocent little 5-yr-old, walking down the hallway of our humble home, and there happened to be one of my mom's dresses hanging on a hanger on the door frame; she must have put it there to dry. As I approached the dress I felt a sense of fear.

Suddenly as I got cloesr to the dress, it started to rapidly twitch and move, as if controlled by a ghost, and emit an ugly sound -- "wauwauwauwauw" -- that quickly oscillated up and down.

I probably woke up crying. I had never seen any horror movies prior to this experience, so my mind is probably like Stephen King's.

Scary nightmare: "Leg in bed" -- Do not read if easily scared

So I'm having sex with some random girl in my bed when all of a sudden my suitemate Chris returns to the apartment. He announces "Hi Max!" so I quickly jump out of bed and close/lock the door before he sees us.

At this point I look at my bed and notice that there is some protrusion, that looks somewhat like someone's leg, dangling out from under the covers with the foot just touching the floor.

I get closer to it and verify that it is indeed the girl's leg.

Wait a minute... the girl had already gotten out of bed and was standing next to the bed, not IN my bed... WTF WHOSE LEG IS THAT THEN? And how did he/she get into my bed without either of us noticing?

I walk towards the protruding leg... and BOOM I am thrown across the room with great force and my body slams into the opposite wall. The covers fly everywhere and I can't really get a good look at the evil leg, or whatever owns that leg. But I know it's a bad thing.

I get that ticklish feeling in my left armpit like someone is poking me in the ribs (very characteristic of my nightmares ever since I was 3). Waking up is very uncomfortable.

Sunday, December 4, 2011

Girlfriend raped dream

I was out with a girl and we had to go to the bathroom. I noticed that the girl's bathroom had a dude in a hazmat mask pretending to be a zombie, but for some reason I was okay with it and thought it was totally normal. So she goes into the bathroom but the "zombie" follows her to the stall... now that is not normal.


Unfortunately as I am about to go save her I am simultaneously attacked by two men. Fortunately I am able to quickly incapacitate one with some non-judo such as knees, but he keeps getting back up so I resolve that I have to kill him. At this point my other attacker, for whatever reason, became unhostile to me, so I explain to my other attacker that "I am not trained to kill" so it takes me a while to crank his neck until he dies.


Then I go in to save my girl in the stall but it's too late; she's already been raped. I see that the guy has left behind a one-dollar bill (implying she is a one-dollar ho) and a note saying "Dear Max, I had fun raping her" etc. So then I find the guy hiding in the stall and start beating him to pieces intending to kill him, only to realize later that I am actually beating on a stuffed animal which is unkillable, much to my dismay and anger. He must have been raping her through a proxy stuffed animal or something.




I ask her why she didn't cry out for help but she says she can't answer. This pisses me off and I tell her she is like one of those stereotypical movie or video game characters that can't reveal plot details until later on, but she tells me she really has her own good reason for not telling me. So I accept that because I love and trust her. Then I realize she has somehow turned into this weird-looking white girl who is a head taller than me and has black cheeks that are puffed out, and weird lips. I still love her, but I remark to her that she has grown much taller in the past hour.


Anyway it's time to escape this hotel room before the bad guys figure out we didn't die. We have been constantly on the run from bad guys with limited gas in our car and limited cash, staying periodically in hotels, so it's time to leave (by the way I LOVE this thrilling recurring dream, perhaps even more than the zombie apocalypse dream). So we jump out the window but the bad guys hear us and begin to chase us. I press the "unlock" button on my car key. A car begins to flash its lights, but I know it's not mine and is instead a decoy trap set by the bad guys. After jumping over a bad guy car who tried to run me over, and running a while longer, I finally find my car. Alas, we were not finished packing from yesterday and there's a giant swivel chair behind my car and the trunk is open. No problem, I throw the chair in the trunk and start the car. But my girlfriend heads off in a different direction and jumps into a completely different car, which works to my surprise. But I want us both in my car so I motion for her to jump into my car. So here I am driving my car with all its doors open trying to pick up my girlfriend who is on the run from the bad guys trying to run her over. Quite a sight.


Finally she is able to hop in my car, but at this point my car became a bus, and the bus driver said we were at max capacity. I wasn't about to let a stupid bus driver stop us from escaping the bad guys! "No problem," I said, "Just keep stalling him until I drive us to the bridge, and then we won't be able to turn back anyway." So I floor the gas pedal, but suddenly the drawbridge in front of us raises, thereby trapping us! I had the brief idea to turn around and go the other direction but realized that we were on a boat! We were therefore trapped with the bad guys on a medium-sized boat, due for another day of trying to kill/avoid bad guys...



Before I awaken, I remark that my subconscious is a brilliant story writer for putting me in this inescapable situation. In reality, it's just because I was stupid enough in my dream state to accept that driving a bus onto a boat is normal, and that busses usually have two drivers.




Thursday, October 13, 2011

War between Children of China and Taiwan (using pigs as ammo)

There was a war between China and Taiwan except only the children were involved. The parents just supervised their children. The water separating China and Taiwan was actually only a small stream, about 10 feet wide. The China children and Taiwan children stood on their respective shores and tried to shoot each other with their blowgun darts. However, the blowguns had not enough range; the darts fell short of their targets.

So both sides started to build a bridge out of ice cream cones. They put the ice cream cones they were eating (with ice cream inside them) into the river, and as the blobs of ice cream were discarded and floated away into the stream, the cones were stacked together to form a bridge. Incidentally the ice cream cones were about the same size as a child's body. But just when the bridge was almost completed, a baby hog shot out from underwater, through the tube of one ice cream cone, and onto Taiwanese land. Apparently China was also using ice cream cones as funnels for their newest weapons system: Hogs giving birth.

China somehow had lots of hogs ready to give birth -- hundreds, in fact. As a hog gave birth the baby hog would SHOOT OUT of the mother's uterus at astonishing speeds. The ice cream cone would funnel the baby and aim it towards Taiwan.

During all this there was a narrator explaining China's hogs-giving-birth secret weapon to me, in English. My Taiwanese friend asked me what he was saying so I had to translate everything into Chinese. It's nice to have dreams that force me to practice my foreign languages.