Dec 7, 2009

Big Miura-Ori


I used painters paper I got from a hardware store, 9' x 13', if i remember correctly.Its hard to find a single sheet that big. The paper is a bit too thin and weak, i would have preferred something a bit stronger that could have held up to a bit more abuse. I had originally intended to make it stand up against a wall on its own. Im using tape now.

I really like it as an exercise in creating a fluid object. It naturally seems to flow on any surface its put on.

dolphin

Yesterday, I walked into the the used book shop on Main in Urbana with a large helium balloon in the shape of a dolphin and asked if he had a copy of Boethius's consolation of philosophy. He didn't.

Dec 4, 2009

LATIN






I had to do this for extra cred for this class Im taking. Use 25 Latin phrases in context, so I thought why not make it awesome!

Nov 27, 2009

Ultimate Garden Path

Im a plant loving guy, so when bored I think about my future fantasy garden in much the same way young girls plan out their weddings by age 7. Being a math guy, Im interested in seeing how I can make this garden as badass as possible. Life's just one giant nonlinear programming problem for maximizing awesome.

Now when I go to a garden, I try to find a path through it that covers as much of it as possible without needlessly repeating parts of the path (as eularian as possible). This helps me see as much of the garden as possible. Sometimes this isnt possible. U of Illinois's Allerton park is a arranged mostly in a line and in no fun to walk through. To see it all and get back to your car, you have to walk through the entire park twice. Dead ends are espcially annoying, my ideal garden wont have those.

Gardens that have even degree intersections are easy to find a path for. Its just a mathematical fact, so Ill use odd degree intersections. 5 paths convering to one spot seems a bit too much so ill keep it to 3 paths for all intersections. After much thought, I came up with the diagram below:



Each one of the circles is a modular unit that i can tack on as i please. This is my ideal garden. Walkng through it leasurely wont show you the entire thing, enticing you to come back later.

Its interesting to think about how travesibility might be used in the design of public spaces, both real and virtual. Shopping centers are easy to traverse and have many even degree paths, but zoos are much harder to go through in that way. I think some games would benefit by having harder to traverse levels, They make less space feel like more and would increase the amount af playability. The real key is to not tick people off, which i think ive done in my garden plans.

Nov 15, 2009

Coopertive pragmatics and semantics in proof writing


This post has a scary title.

The cooperative principle basically states that when when people communicate, they try to be helpful by saying the strongest statement feasible.

Example: Look at the puppies to the left.

I could say "There is 1 puppy in this picture.", which translates into 2 different logical statements:

(1) There is only 1 puppy.
(2) There is at least 1 puppy.

The word one here is a quantifier over the set of puppies. Unfortunately one represents the two different quantifications shown one of which is true and one of which is false.

We tend to interpret the sentence to mean (1) because I could have just as easily said "There are two puppies". (2) is a weaker statement and just as much work to say. Thus, "There is 1 puppy in this picture." feels like a lie because its uncooperative.

It recently occurred to me that in math proofs I see this type of ambiguity all the time. I almost did it myself today and strangely I was never taught to not do this. Because the quantifier in meaning number two is essentially the existential quantifier mathematicians may be more prone to intending the second meaning even when it is not really the cooperative one. I going to start making sure I explicitly mark which of the two meanings I mean when writing proofs from now on and take it as a general rule of good proof writing.

Actually this post was just an excuse to show that picture of the two cute puppies. Arent they adorable?

Jun 22, 2009

some thoughts on language.


Speaking forces information to be transmitted in a such a special way. Broadly, it forces us to encode information as a stream of characters knowing that the receiver has a very limited buffer. Speaking is unfortunately, sequential in nature.

Semantic chunks of knowledge have to be ironed flat and then reconstructed later with only a small amount of processing. Like ive pointed out in earlier posts maybe about a year ago, this forces a convention of sequentialy on our math notation, the result being that our math notation is speakable but possibly a bad influence. Order free logic is a clear example of where no easily speakable notation can be made, maybe why something so obvious was overlooked. Order free logic is inherently a nonsequential type of thing.

A similar principle holds true even for story telling. Stories are still told sequentially even with the capabilities of hyperlinked text. Of course speech pragmatics are involved. Its easy to mark time by having older things happen in the end of the text and new things later. Temporally sequential things are written sequentially.

The only form of knowledge transmission i can think of that isnt restricted by this squentialness are diagrams. Unfortunately a well formed syntax for them is not availible.

I like to think of information as abstractly a graph of nodes (either being a primitive concept or a graph themselves) with connecting thematic roles. In our normal communication, we take a region of the graph, cut it out, flatten it and then speak it. We force a sequential representation. Its interesting, but hard to imagine a writting system that isn't sequential like language. We should resist an attempt to fill in an N by N grid with characters and then attempt to ascribe some meaning. Instead my graph concept works fine. The image is the representation of green ideas sleep furiously.

need to get sleep. not even gonna see if anything i typed made sense.

May 28, 2009

Mathematical Intuitionism and the project

I don't really know what im talking about, but ...

It occurred to me that my project does not use negation as failure, and also doesn't use the law of excluded middle. Its not like Im purposely trying to go against what would be normal, I only did what I thought made sense when writing. This just goes to show how much creatively there is in ignorance.

Im not trying to view this projects as something mathematically concrete. I don't really refer to anything as a "Model". My reasoning for the ternary model was that any proposition exists in one of THREE states with respect to a body of knowledge, that it either is confirmed, denied, or bears no relation. It looks like ive somehow stumbled into being a mathematical intuitionist though.

Funny how the wikipedia article, which is my only source of info on this area, doesn't mention anything about ternary logic, or modal logic (my ternary logic is really just a cheap substitute for modal logic after all).

At any rate this intuitionism appeals to me on some really sort of zen level. Maybe God can separate out all logical statements into True, and False. We however can't and it leads me to be very unsettled. I don't think ive ever written a nonconstructive proof in college. Now I don't feel safe in saying that anything thats not false is true.

Open Source Board Games

Earlier I talked about making Monopoly "open sourced" and how such an important piece of American culture should be owned by the culture. Now Im wondering how to do this for Settlers of Catan, a really fun and unique board game I just learned about. This game too, seems a bit overdone, but nowhere nearly as bad as monopoly. Making a game free from its manufactured nature often requires reducing the complexity of the game in several ways and just trusting the natural shape of the game to produce interesting situations. Ive been having some luck with a version Im trying with a deck of cards as the board.

May 11, 2009

Logic Unification in Trinary Logic

Im still workin on making the logic programming language of my dreams. Right now I have to get some sort of unification working, but Im using trinary logic so its been a bit of an adventure. Prolog doesn't have real negation so it really manages to sidestep alot of actual work. Informally in my logic system, called Llull, a statement has three possible truth states: 0 = No, 1 =Iono, 2 = Yes.

Yes and No are basically like True or False. Iono is much different. Since negation is allowed in Llull, determining wether a model implies something is an NP Hard problem. My unification isn't an exhaustive search, therefore, for hard problems, Llull will just throw its hands up in the air and say "iono and i don't care to actually figure it out". Iono means that either theres no data about the thing you asked about, or that it just can't find it.

Anyway, traditionally And, Or, and Not have been defined for trinary as:

  • And(s1,s2) = min(s1,s2)
  • Or(s1,s2) = max(s1,s2)
  • Not(1) = 1
  • Not(0) = 2
  • Not(2) = 0

If you check, these definitions make tons of sense. But to see why they really arent sufficent for my purposes maybe I should cover my unification algorithm. My unification algorithm works by breaking up statements in this manner (where s1, s2, s3 are all Llull statements) :
  • s1 -> And(s2, s3) if And(s1->s3, s2 ->s3)
  • s1 -> Or(s2, s3) if Or( s1->s3, s2->s3)
  • s1 -> Not(s3) if Not(s1->s3)

Rough Example:

Sean is a CS/Math Major -> Sean Studies CS And Sean Studies Math
iff
Sean is a CS/MathMajor -> Sean Studies CS And Sean is a CS/Math Major -> Sean Studies Math


Seeing this, it would be tempting to believe in rules such as:
  • And(s1, s2) -> s3 if Or(s1->s3, s1->s3)
This would be the case if we didnt' have Not, which is the source of all our No/0 values. But If we consider this case:

  • Suppose s1->s3 = 1. That is, Statement 1 doesn't tell us wether Statement 2 is True. Suppose s2 -> s3 = 0. That is, Statement 2 tells us that Statement 3 is False.
  • Our algorithm gives us the wrong answer. It gives 1 when it should give 0.
Clearly what is needed is a function like Or and one thats like And. I figured out what they should be and named the Or substitute Kind, the And substitute Cruel. I really don't know how the names came up in my head, they just did. They names just seem to fit well somehow.

Apr 21, 2009

Stupid projects

So I haven't been posting so i guess ill just take this opportunity to try to piece together some information about some of the projects i doing for my courses.

Project 1. Some sorta Model Checking/logic programming thingy:

Yea Im writing a logic programming "thingy" in python under the working title Llull. You don't have to tell me why this is stupid, I know how to do it in Ocaml or even more trivially in Prolog. The reason Im doing it in Python is im trying to make it significantly different from the norm and i need to be able to hack stuff on.

For example, right now it uses trinary logic: True, False, and IHaveNoDamnClue. If you ask Llull wether a statement is True it can return any of those. I don't claim to actually know prolog, but basically it doesn't have a real Not for a reason. The problem of model checking is NP hard, and my current implementation assumes you use Not in a pretty specific way. Sometimes IHaveNoDamnClue is returned when Llull is just too damn lazy to get to the truth(in special cases it actually returns false when it should return IHaveNoDamnClue, but ill fix this i swear). It uses unification after all.

Also, in accordance with past rants, the Logic in Llull uses thematic arguments, which Im pretty excited about. Thats the real reason for writing it in the first place.

As a side effect of working in Python the entire implementation is very object oriented in a very weired way. I currently just use Python's interactive programming environment to run it. Everything from Statements to Logic Connectors to the Environment are instances of objects. This has led to a number of weired situations where ive used functional code to Map arguments to functions which output Llull logic statements. And then i do logic programming with them. Needless to say im very amused.

Project 2. An Improper use of Neural Networks:

I basically just want to see how well neural networks could be used as deciders for simple context free grammars. Some grad student said i was stupid for trying, but they're never to be trusted. After all, they know too much. I haven't really started, and writing about this is kinda procrastinating but Id like just to test the idea out on well bracketed strings like: (()()(())).

I guess this is partially motivated by my fervent believe in the Chomsky faculty and that language is fundamentally context free. Another thing which grad students tell me im stupid for believing in. But again, what the hell do they know?

Mar 16, 2009

Just a crazy idea.

So i was thinking about pylog yesterday. I still haven't had time to really figure it out yet, but the idea of having bindings for a logic programming language really intrigues me. In particular I had an idea for an application for it.

Lets say i have a map class which is a 2d array of tiles, and each tile stores information about the map at the location: height, terrain, etc. I might have another class called cartographer which does stuff with the map class but unfortunately the cartographer and the tile class are interlinked. If i want the cartographer to give a certain tile a color, I would have to make a color field in the tile class.

Now obviously the solution is to have a space that can be written to in some notation (maybe xml,yaml) and then be reinterpreted by the cartographer class. This of course isn't done because its not practical and not a really common feature of any language i can think of.

But wouldn't it be really cool if these spaces for writing were actually little spaces of logic programming who all used common rules. Im not sure that this is the right encapsulation, but it would be fun.

ps. i need new hobbies for doing in class.

Mar 14, 2009

something i just thought about

Ive recently hit upon something about programming. There are two different kinds of objects that don't represent a data structure:
  • Generic objects with multiple possible meanings
  • Concrete objects with only one intended meaning
Integers, for example, can be used to represent lots of things, quantities, distances, speeds, and even the color of a pixel. Objects this basic aren't even really objects often, they don't need to be. The ability to correctly interpret the meaning of the variable is left to the programmer in the future. It is possible for example to add the number of apples on a tree to a persons height if the programmer decided to store those as ints (which they most likely would).

Most objects written by programmers have only one intended meaning. I could for example create a height class which would allow me to add heights and the embedded semantics of the operations would prevent me from adding height and apples together.

Whats interesting is creating classes of the first type and then being asked what the class is for.

Feb 26, 2009

There was a ladybug in my bedroom, living among the plants. I moved it to where I have moved all the plants and i hope its happy.

If I did the kinds of things I wish people did, I would have never gone to college.

Feb 18, 2009

Stupid game programming in Python

So i decided to write a short game like thing in python using pygame (fun library). It became known as pizza-shamrock even though i was initially going for some type of sumo wrestling like game. I guess it all started as me wanting to use pythons native support for complex numbers for awesome. I had just come out of a complex analysis course and it seemed obvious that the position of the sprites in any game should be represented by complex numbers.

I know it sounds insane. Its clear its not a great idea to represent their position with two integers, but you could at least just use a vector right? That would be better right? maybe...

Historically, complex numbers and their 4d friends, quaternions, came about long before vector notation became the standard for describing physics. This isn't a mistake, complex numbers and quaternions form a beautiful algebra, unlike vector math. Complex numbers have multiplication and addition as operations. Vectors have addition and a two different kinds of multiplications and man its not as cool, either trust me or take complex analysis.

In short by using complex numbers im able to do cool tricks that would be much harder to do with vectors. Like, i can transform the game to polar coordinates by complex exponentiation. With a vector id have to use trig. I don't really understand how Python does complex exponentiation natively, esp since you have import a math library to do trig, but whatever.

If you don't believe me that the weirdness of complex numbers is worth it, read the quaternion article. They're being used more and more in computer graphics to succinctly describe transforms that would normally be ugly as hell with vectors.

I guess you can argue that for maintainability reasons (cuz very few people are comfortable with complex numbers) my code should've used vectors. So im not really arguing that complex is the way to go, im just arguing that its awesome.

Jan 11, 2009

late winter break.

Not much to say apart from snow viewing. Can't say i feel really good about education right now, but im more relaxed than I normally would be.

Not sure where to devote my efforts now: quaternions, tensors, numeric algorithms, stupid stuff in python, human syntax, japanese.

Its hard convince myself that ive done anything, or that im allowed to relax.
This is sinning at its worst.