Search This Blog

Wednesday, July 30, 2008

Comcast Revisited

A bit ago I wrote a Mac Chaos-inspired parody of the Comcast board room, explaining how they'd gotten into this P2P bandwidth crisis they're in, and proposing that the true cause of their crisis is that they'd signed up massively too many users for their old infrastructure while steadily increasing speeds offered to subscribers. A post on P2PNet today lends strong support for that conclusion.
There really is a problem on (at least some) cable upstreams today, based on what I hear from people I respect who have the data. My hope - which won’t be tested until 2009 - is that the DOCSIS 3.0 upstream will resolve most or all of the problems for the next few years. Full DOCSIS 3.0 has a minimum of 120 megabits upstream (shared) among typically 300 homes, something like 400K per subscriber. Current cable modems typically have 8 to 30K per subscriber. This is a huge difference.

While those 'K' don't indicate whether those are kilobits or kilobytes, a bit of quick math tells us that those are kilobit counts. In other words, currently Comcast is allocating a minimum of 1 to 4 KBps for each subscriber. As well, IIRC, Comcast sells 384 to 768 Kbps upstream connections. That puts the overselling ratio between 13 and 100.

Another section is also interesting, for comparison with DSL and FIOS:
Verizon, AT&T, and Free.fr are strongly on the record they do not have significant congestion problems. They do not have a shared local loop, and have allocated much more bandwidth per customer. I’ve sat at the network console of a large ISP and seen they had essentially no congestion amongst the millions of subscribers they served. They allocate 250K per subscriber, much more than current cable.

It's not clear who these figures are for. I believe AT&T DSL doesn't offer more than like 768 Kbps upstream, in which case this would be an overselling ratio of 3. If this is Verizon FIOS (let's say at 5 Mbps, which is their faster speed), that's an overselling ratio of 20. Suddenly it seems very unsurprising that Comcast is having problems and AT&T/Verizon are not. It also shows you who's been investing in their network over the last decade and who hasn't.

Tuesday, July 29, 2008

& Other Strange Ocurrences

As it turns out, the earthquake this morning was actually the second highly unusual thing to happen today. The first occurred late last night, as I was going into the bathroom one last time before going to sleep. A couple steps into the bathroom and I stepped into something wet. While having the floor of your bathroom wet for no apparent reason is unusual enough, I was more concerned with the smell: a faint smell of ammonia, and another smell I knew I had encountered before, though I couldn't think exactly what it was.

After I confirmed that the liquid was what was producing the smell, I hobbled back to my room (trying to avoid getting whatever it was on the floor as much as possible) to grab my glasses, and had another look. A fair amount of the floor was wet with several ounces or so of a liquid that was in some places clear, in other places milky white.

After tracing it under the sink, I found what seemed to be the cause: a can of insecticide. The entire can was wet, though not much that wasn't right near where it was, so it didn't look like an explosion (though there sure was a lot of the stuff on the floor). I didn't try removing the cap (for obvious reasons), but I'm thinking the spray nozzle might have exploded and the cap prevented the stuff from getting all over the cabinet under the sink. Ultimately, I wrapped it in a couple plastic bags and threw it in the trash, and wiped up all the stuff on the floor (probably wouldn't hurt to mop the floor with soap and water, either).

& Shaking

Just had an earthquake here, about an hour ago. The epicenter was 15 or 20 miles from here, and it was a 5.8, which is a pretty good size earthquake. Watching TV news for 20 mins or so, there have not been any reports of injuries, though cell phones and (less commonly) land lines are still out in some areas; I've heard some about damage to streets and one water line. Amusingly, lots of people e-mailed the news station to say that their phone lines or cell phones are out, so apparently it didn't do much for internet connectivity. I heard that there's a 5% chance of it being a foreshock to an even bigger earthquake.

More info on Yahoo and CNN.

Saturday, July 12, 2008

Epic Fail

So, on Friday I got a new computer. The computer consists of a quad-core Core 2 CPU, 4 gigs of memory, and a Radeon HD 4850 based video card. Although there are some known techniques for getting an existing Windows installation to work in a new computer, this install simply refused to work with the USB ports on this computer (the computer freezes up several seconds after Windows has booted; disabling the USB ports in the BIOS allows it to work, but is not an acceptable solution). So, I ultimately ended up reinstalling Windows.

I had quite a few options when it came to choosing a version of Windows. Thanks to my obsessive downloading of everything on MSDN Academic Alliance, I have legal copies of Windows 2000, Windows XP x86, Windows XP x64, Vista x86 & x64, two copies of Windows Server 2003, and Windows Server 2008 x86 & x64. For those not familiar with the Servers, 2003 is an updated server version of XP, and 2008 is an updated server version of Vista.

As Server 2008 is an updated version of Vista with additional features (and the newest of any version), I figured I'd use that, and that's what I'm writing on right now. However, this install may be short-lived. As it turns out, just about nothing works on Server 2008. In the last three hours I've encountered the following:
- The Asus motherboard driver installer for Vista x64 will not run. When run, it says "Does not support this Operating System: WNT_6.0I_64". If I understand this correctly, it's saying it doesn't support Windows NT 6.0 x64. This is curious, as this is exactly what Vista x64 is, suggesting that the installer does not run on the system it was made for. Furthermore, several pieces of motherboard hardware do not have drivers included with Server 2008, and so appear as Unknown Devices and PCI Devices (there are still a couple unknown devices left if you manually install each driver). Epic Asus fail.
- The other major driver I needed was the 4850 driver. This was especially important because the 4850 has a known issue where the fan speed stays too low, resulting in hot temperatures. So, I downloaded the latest version of the drivers and ATI Catalyst programs from the video card manufacturer (as best I can tell the ATI web site doesn't list drivers for the 4850) and installed the driver and program. Installation had no problems; running the Catalyst Control Center, however, resulted in the message "The Catalyst Control Center is not supported by the driver version of your enabled graphics adapter.". Very curious, considering that driver and the Control Center came bundled in the same ZIP file. Epic ATI fail.
- One of the programs I use most of all (by far) is Windows Live Messenger. Naturally I soon needed to install it on this computer. The Windows installer even helpfully created a Windows Live Messenger Download link in my start menu. Unfortunately, following the link, downloading the program, and double-clicking it (I'm not even mentioning the UAC and IE annoyances) brought up the error message "Sorry, Windows Live programs cannot be installed on Windows Server, Windows XP Professional x64 Edition, or Windows operating systems earlier than Windows XP Service Pack 2". By process of elimination, this appears to say that only supports XP x86 SP2+, Vista x86, and Vista x64; curious, given the fact that Microsoft advertises support for Server 2008. Epic Microsoft fail.
- The other program I use most often is FireFox. So, that was next on the list. Download, install, so far so good. Launching FireFox, however, is a completely different story: instant crash. Epic FireFox fail.
- And just for good measure, this install has blue-screened once so far (in about 3 hours), with the PAGE_FAULT_IN_NONPAGED_AREA bugcheck. I'm not sure exactly whose failure this is, but the Asus driver problems seem the most likely suspect. Epic fail.

Wednesday, July 09, 2008

& Fun with Turkish

Just saw this amusing segment in the Wikipedia page for Turkish grammar:

Avrupa (Europe)
Avrupalı (European)
Avrupalılaş (become European)
Avrupalılaştır (Europeanize)
Avrupalılaştırama (cannot Europeanize)
Avrupalılaştıramadık (whom [someone] could not Europeanize)
Avrupalılaştıramadıklar (those whom [someone] could not Europeanize)
Avrupalılaştıramadıklarımız (those whom we could not Europeanize)
Avrupalılaştıramadıklarımızdan (one of those whom we could not Europeanize)
Avrupalılaştıramadıklarımızdan mı? (one of those whom we could not Europeanize?)
Avrupalılaştıramadıklarımızdan mısınız? (Are you one of those whom we could not Europeanize?)

You now know the meaning of 'highly agglutinative language'.

Friday, June 27, 2008

Sansas & Bugs

Given how big I'm into music (particularly game, anime, and movie soundtracks), it'll probably come as a complete shock to most people to know that I've never had a portable CD or MP3 player (other than the CD player in my car). Probably the biggest reason for this is that I'm cheap - I save most of the money I make, and spend very little of it, even on things you'd expect me to buy (like a computer that's less than 6 years old). Well, yesterday I just bought a digital audio player: the SanDisk Sansa c250 2 gig, on sale at a price I couldn't refuse (cheaper than Amazon).

So, I spent some time playing with it yesterday, in preparation of today, when I drive my grandma to a doctor's appointment and various errands (she's had severe eye problems for the last couple months). Not a bad little sucker; though just as you might guess from the price, it didn't take long to run into problems. Naturally, as I'm too impatient to call tech support, and too inquisitive to give up on a technical challenge, this meant I had to debug the thing.

After loading almost 2 gigs of music onto it and disconnecting from the computer, it proceeded to promptly lock up on database refresh (after you modify the contents of the flash memory it scans all the files and indexes them). Wonderful. I could turn it off and on, but every time it turned on it immediately performed a database refresh, and promptly locked up. Worse, it would no longer connect to the computer, as the database refresh preempted other things, like USB port communication, meaning I couldn't delete anything that might be causing it to freeze (specifically, if you plugged it into the USB port while it was performing the database refresh, Windows would say "unrecognized USB device" after a couple seconds).

A substantial amount of experimentation revealed that it was possible to override this. Specifically, you had to have the computer send a USB signal to the device BEFORE it starts its database refresh. As the database refresh is the first thing it does when you turn it on, and plugging the USB cable in automatically turns the device on, this takes rather precise timing, and more or less requires pressing the button required to make it connect in mass storage mode*, insert the USB cable, and press "Scan for hardware changes" in Device Manager at essentially the same time (I'd say about 1/3 of a second). This will cause the USB signal from the computer to preempt the scheduled database refresh, and put it into USB storage mode.

Now that I was able to access the contents again, I spent some time fumbling around with trial and error, trying to figure out what was causing it to break; as it was 1 AM by this point, my brain wasn't in peak working condition, and this took some time. Searches on Google revealed that quite a few people had this problem and there are quite a few hypotheses as to what causes it and how to fix it, but no definitive explanation or solution (nor has Sandisk addressed this problem, despite people asking for help on their forums). As well, many of the "solutions" involved wiping the memory of the thing, and sometimes bricking it.

Through trial and error, I managed to burn through a number of hypotheses (which were either incorrect or simply not applicable to me). It appeared to be false that spaces in directory and file names caused lockups (or that bug only occurred in older versions of the firmware). I also did not observe any instances of odd characters in song titles or artists that caused this problem; to my surprise, the device even correctly handled and displayed the Japanese characters in some song and artist names (when I had first opened the package, I tried copying a single album onto it, which worked without incident; this album happened to have Japanese ID3 info). Lack of free space did not appear to cause it (I tried taking it down to 2 megs free space with good files, and it still worked fine). ID3v1 tags seemed to work fine. Even this one funky MP3 at "0 kbps" (what Explorer reports for it; I haven't looked at it with a hex editor to figure out why this is) did not cause the problem.

What ultimately ended up being the problem, at least in my instance, was that one of my game soundtrack MP3s was mislabeled as 'hard rock'. The significance of this, according to one person, is that it has a space in the genre name. Changing this to the proper genre corrected the freeze. I can't say for certain that the space in the genre is what causes the bug, but it's true that when none of my songs have a space, the player works fine, and it froze in that one case.

*The Sansa has two USB connection modes: MTP and MSC. MTP mode interfaces with media players such as Windows Media Player. This mode allows you to store media library files on the player, and make use of various features like tagging and playlists. MSC mode causes the player to act like a vanilla memory stick, allowing you to directly access the flash file system. I'd imagine it's only necessary to refresh the database in MSC mode; that's the only mode I've ever used.

Judging from Google, there are two different methods of switching between modes, which depend on what firmware you have. One method is that a USB mode option appears in the settings menu on the device. The other method (what mine has) is that the player is always in MTP mode, but connects in MSC mode if you hold the rewind button when you plug it into the USB port.

UPDATE:

Found another bug while playing around with putting DRMed WMAs on the critter (my dad also got one, and he has a bunch of DRMed WMAs to put on it, unlike my MP3s). It's only possible to load DRMed files onto the device in MTP mode, so I had to learn how to use that. It appears that my assumption was correct, that database refreshes are only necessary after adding files in MSC mode; after files are added in MTP mode, they appear in the player immediately after the player is disconnected from the computer.

While the player automatically turns on and goes into USB storage mode when you plug the USB cable in, it's possible to turn off the player by holding the power button (the same way you turn it off when it's not connected to the computer) while in USB storage mode. This is not a good idea. If you add some files to the device and then turn it off before unplugging it, it will lose track of those files, and they will not show up in the list of songs on the player (though they will still show up in the file list when it's connected to the computer in MTP mode). Adding additional files later will not cause this problem to be corrected; it is necessary to delete the files from the player and then transfer them from computer again

Tuesday, June 24, 2008

Random Thought of the Day

Did you ever notice that, in English, the simple past (e.g. "he wrote") and past progressive (e.g. "he was writing") are both very common, yet in the present tense, the present progressive (e.g. "he is writing") is overwhelmingly more common than the simple present (e.g. "he writes")? This fact actually leads into an important linguistic principle, which I'll probably write a post about in the future. I'll just leave it as food for thought, for now.

Monday, June 16, 2008

Cases, Ergative, & Accusative

Something that I vaguely implied previously, but I don't think actually said, was that there is a difference between roles and cases (even worse, there are multiple things that "role" could refer to). Roles are, in theory, purely rational, language-independent categories which describe how nouns relate to their clause's verb. Cases, on the other hand, are language-dependent categories representing many things, and there is rarely (if ever) a 1:1 mapping of the two for a language.

The Grammer of Discourse hypothesizes at least ten universal roles, which I'll only briefly describe.
Experiencer: the person experiencing an emotion or sensation
Patient: the one an action acts on
Agent: the one willfully performing an action
Range: an extension of the verb, such as indicating how, e.g. "Your blood smells good"
Measure: an extension of the verb indicating how much, e.g. "I was only bitten a little bit" (these examples brought to you by Vampire Knight)
Instrument: something which is used to perform an action; this can also be used for animate entities who unintentionally perform an action
Locative: the location an action occurs at
Source: the starting point of some kind of movement or transfer
Goal: the ending point of movement or transfer
Path: the path taken during movement or transfer

If we were to compare this list of roles with typical use of the Latin cases, we would get the following. Note that this list is approximate, and some of the roles like measure and range I'm not even sure how to represent in Latin.
Nominative case: agent, patient, experiencer, instrument
Genitive: unrelated to role in the sentence (roles refer to relation with the verb, not with other nouns)
Dative: goal, patient
Accusative: patient, experiencer, goal, rarely source
Ablative: source, instrument, locative, goal, path, possibly range and measure (some of those requiring prepositions)
Locative (rare): locative
Vocative: not related to role

However, while case is language-specific, some themes (common cases) occur much more often than others. Of the Latin cases, the nominative, genitive, dative, and accusative occur very frequently in all languages; this is not surprising, as these seem the most essential to language in general (though note that they are not guaranteed to mean exactly the same thing in all languages).

The nominative case is roughly defined as the subject of the verb. For transitive verbs having a direct object, the subject is the one performing the action (e.g. "He poked her"); for intransitive verbs the subject is the single argument (e.g. "He was hit"). The accusative case is the object of transitive verbs. Any language having this structure is called a nominative-accusative (or sometimes just accusative) language (which we're going to call N/A in the rest of this post).

However, two others - the ergative and the absolutive - also occur very commonly in languages. The ergative case is defined as the subject of transitive verbs. The absolutive case, however, includes both the subject of intransitive verbs and the object of transitive verbs. Languages using this system are called ergative-absolutive (or sometimes just ergative; E/A, here).

At first this seems very strange and arbitrary - splitting the subject depending on whether the verb is transitive or intransitive. However, this is due to the fact that we don't speak an language. In fact, even the word 'subject' reflects this bias in thinking. The N/A split carries the paradigm that all actions are done by somebody/something, regardless of whether the action is intentional or unintentional, or even whether there's anyone performing the action at all (e.g. in "He fell"). This is called the subject, and for transitive verbs, the one acted on is the called the object; thus the N/A split actually corresponds to a subject/object division.

However, we get a different picture if we discard this assumption and look at things from the perspective of roles. In reality, with many intransitive verbs (such as the one shown above) the "subject" is not the one doing the action at all, but rather the one who is subjected to the action - the patient. Thus the E/A split is based on the paradigm that the ergative case is the doer (agent or instrument) of the action, while the absolutive case is the patient of the action - an agent/patient separation. Taking it one step further, some E/A languages even require that the ergative argument commit the action intentionally, and use a different sentence structure to indicate otherwise (e.g. split-intransitivity languages use either the ergative or absolutive case for the subject of intransitive verbs, depending on whether the action is intentional or not; others use the passive voice for unintentional actions; etc.).

Given this, both seem equally sensible, and the choice itself now seems arbitrary. It's worth noting, also, that most languages in the world are either N/A or E/A. Languages using other systems are rare, which might suggest that the N/A and E/A splits are more sensible and/or useful than other methods. But hold onto that thought.

Thursday, June 12, 2008

Case & Other Cases

One thing necessary in all languages is that the nouns in a sentence that play various roles/cases must be identifiable. While the exact amount of precision varies by language and by sentence structure (there may be more than one way to say something, or only certain structures may be used in certain cases), all languages have a way to indicate the subject, direct object, etc. (although of course the exact set of roles that exists varies by language, as well). As far as I'm aware, there are three methods of accomplishing this: dependent-marking, head-marking, and analysis (note that none of these terms refers exclusively to role; I'm merely discussing them in this one specific context).

Let's start with the easy one: analysis. This is the method English uses for its core roles: subject, direct object, and sometimes the indirect object. As I pointed out in The Decline of the English Language, Modern English has a fairly rigid word order for its core roles: Subject Verb [IndirectObject] [DirectObject], as in "The boy gave the dog a bone"; some other word orders are used by native speakers, but they're uncommon, and generally only used in certain specific contexts (e.g. the Verb Subject Complement order in "Are you an idiot?"). Thus analysis refers to the use of strict word ordering to determine what role each noun has.

As I mentioned in the same paper, English wasn't always this way: it belongs to the same language family as Latin, all traditionally using dependent-marking of case. Dependent marking refers to the fact that each word is marked to indicate its role. In the same sentence "Puer [boy] cani [dog] os [bone] dabat [gave]", the four words may be placed in any order, and the meaning will still be clear, because the nouns carry the nominative, dative, and accusative cases, respectively (actually, that isn't 100% true; because some cases decline the same way, there can be some ambiguity here).

You might notice that English also does this for non-core roles, which corresponds to greater freedom as to word order. As dependent-marking does not require that the mark actually be attached to the word, English uses prepositions to mark non-core roles, rather than the traditional suffixes of Indo-European languages. This system is used for such roles as instrument in "The boy poked the dog with a bone" (the Latin version, "Puer canes osse pungebat", uses the ablative case, and the accusative case for the dog), the benefactor in "The boy bought a dog for her" (in the Latin version "Puer canes per ea emebat", a preposition is used with the ablative in this case), etc. The last example also illustrates that Latin uses prepositions as well, to mark roles outside the 6 core cases.

Both of those have been something that isn't entirely unfamiliar to English speakers. Even case still (barely) exists in the pronouns and nouns of English (having three and two cases, respectively); the third method, head-marking or agreement, is also not absolutely foreign, though it is uncommon in modern English. Verbs in Indo-European languages traditionally agree with the subject of the sentence - the verbs themselves indicate the grammatical person and number of the subject. While English has all but lost this form of agreement, you can still see vestiges of it. The verb 'am' uniquely identifies the subject as first person singular, while 'is' identifies the subject as third person singular ('are' is ambiguous, because it could refer either to second person singular or any person plural); similarly, the -s form of all other verbs (e.g. 'gives') identify the subject as third person singular. Romance languages like Spanish still contain robust subject-verb agreement, such that it is possible to uniquely identify the subject as first, second, or third person (never mind the bad terminology for now) and singular or plural.

However, you might have noticed something: in languages like Latin that have subject agreement, marking nouns with the nominative case (used for the subject) can be redundant. Head-marking, or polysynthetic, languages do away with this use of case, and purely rely on verb agreement to indicate which nouns have each role. I can't find a good example of a sentence that would indicate how this would work without introducing other things I don't want to get into, so I'm gonna make one up:
In this example, theyare attachedit pronouns representingthem the subject, direct object, and indirect object the verb of each clause. As with English pronouns in general, theyagree the attached pronouns with number and gender of the nouns. For the verbs, iusedthem the subject-verb-object order and pronoun cases, to makethem the verbs easier to read for English speakers. However, iusedthem varying word orders for nouns in the clauses to illustrateit how itcan be used head-marking with different word orders. Typically theywould useit head-marking head-marking languages with other modifiers like possessives, as well.
Finally, the Totonac language takes polysynthesis to a ridiculous extreme. According to the examples in The Grammar of Discourse, Totonac merely lists all roles in the sentence, without using agreement to indicate which nouns have which roles. One example given (I'm kind of making up my own orthography, here) is "liiteemaktamaahua [literally 'with-passing by-from-buy'] tumin [money]", which means "As [he] passes by, [he] buys [it] from [him] with money". Amazingly (and completely against expectations), native speakers of Totonac can actually understand each other.

Friday, June 06, 2008

Beyond Godly

On Recording Industry vs. the People, in response to this story, somebody suggested:
It would be interesting to set up a 'honey-pot' node (using maybe a printer or a network monitoring box), wait for a takedown notice, and say "see you in court". It would be even more interesting to see the discovery request for the hard disk of a printer.
That idea is beyond godly - set up a honeypot network that isn't actually sharing copyrighted material, and file DMCA abuse suits for every DMCA takedown notice they receive. I suspect that would very rapidly lead to more thorough investigations before companies fire off bogus DMCA takedown notices.

Thursday, June 05, 2008

Empirical Data and the RIAA

A bit ago I wrote up a rather lengthy list of factors which could, in theory, produce false-positives in identifying users sharing copyrighted files via peer-to-peer programs. Most of these risks could be mitigated by thorough investigation, though I noted that as the RIAA clearly cuts every corner they can, it's likely that few if any of these mitigating measures are taken in actual investigations.

Now the University of Washington has demonstrated some of these risks in actual occurrence in their project Tracking the Trackers: Investigating P2P Copyright Enforcement. While they've only looked at a couple of the risks I suggested, the results show quite a few false positives, indicating that my prediction that measures to minimize these risks are not being applied was accurate.

The research paper is here, if you don't want to go through the project's web site itself. The New York Times blog has also picked up this story. They also have a cute logo/illustration:


This was actually a study I've been wanting to see done for some time. The other study that I think is very important but has not yet been done is to determine empirically how, on a system like eDonkey, where users search all peers for a certain file, the number of requests a single computer gets for a single file varies with the popularity of the file. The basis of this investigation is the claim by RIAA and others that users could be sharing thousands or millions of copies of each copyrighted work, therefore constitutional limitations on civil damage awards do not apply.

Clearly files that are popular (e.g. the latest hit song) will be downloaded more (in total) than files which are unpopular. But does this mean any single computer will upload popular files significantly more often than unpopular files? I believe the answer is no, for the reason that because the files are more popular, not only are they downloaded more, but they are also available from more computers. In theory, the increase in demand is accompanied by a proportionate increase in supply, keeping the ratio invariant regardless of demand. According to this belief, I have argued on forums (one example here) that most of the people the RIAA has sued have, according to simple probability, not uploaded more than a single copy of each file, on average (so about $0.70 of damage per file, if you assume 1 download = 1 lost sale, which itself is highly suspect).

Thursday, May 29, 2008

Absolutely Amazing

Since it would take quite a patchwork of quotes to summarize this story, I'll just give a few bullet-points of my own as a summary.
- Revision3 uses BitTorrent to distribute its own content (legal distribution, in other words)
- Everybody's second-favorite company MediaDefender decided to play with R3's tracker. Once they found a hole that allowed the tracker to serve torrents not by R3, they began using the tracker to track their own files.
- R3 discovered that somebody was using their tracker for external content and banned MD's torrents
- MD's servers (the ones actually uploading the files that they were using R3's tracker to track) responded by DOSing R3's tracker (according to one person on Slashdot, MD has a 9 Gbps internet connection for this purpose), taking R3's tracker and other systems completely offline
- The FBI is currently investigating the incident. Some have suggested and are praying that the PATRIOT Act could be used to charge MD with cyber-terrorism, as defined by law.

Various coverage:
Inside the Attack that Crippled Revision3 (mirror)
MediaDefender, Revision3, screw-up
Revision3 Sends FBI after MediaDefender

Thursday, May 22, 2008

More on kd-tree Splitting

I was just reading the paper Analysis of Approximate Nearest Neighbor Searching with Clustered Point Sets, which, as the title indicates, performs performance analysis of 3 different kd-tree splitting policies. The policies used are the standard policy, the sliding-midpoint policy, and the minimum-ambiguity policy, which is new in this paper.

The minimum ambiguity method takes into account not only the full set of data points, like all the others, but also takes into account a set of training regions which represent the distribution of regions to find points within - that is, the future searches themselves. As with the other methods, the goal of the algorithm is to minimize the average number of nodes in the tree that overlap each search region; however, when both the searches and data points are known, the minimum-ambiguity method can do it better than the others.

Two different scenarios analyzed are of particular interest. In all cases the data points were clustered; the two correspond to the distribution of the training regions: the same clustered distribution as the data points, or uniform distribution. In the case of both using the same clustered distribution, the minimum-ambiguity policy > the standard policy > sliding-midpoint policy (here using the internet use of '>' as "is superior to"). In the case of searches distributed uniformly, the sliding-midpoint policy > minimum-ambiguity policy, with both far superior to the standard policy.

So, what's it mean for writing a kd-tree for a game? Well, it provides some pretty interesting information, though it doesn't change the bottom line. As mentioned in my paper, more complex splitting policies like sliding-midpoint and minimum-ambiguity are only viable for data sets that are essentially fixed. In a game, this corresponds to immobile objects that are either unchanging (e.g. cannot die) or change extremely infrequently; in E Terra, this corresponds to doodads - objects which take up space but do not have any function - and immobile game objects such as grass (which is edible but not consumable).

As also mentioned previously, the distribution of points is not expected to be uniform - it's expected that there will be clusters of things at various focal points on the map. Furthermore, in the case of mobile objects, the search distribution will roughly equal the distribution of the data points themselves.

Unfortunately, neither of these facts is useful to us. Despite the mostly known distribution of searches, we cannot use the minimum-ambiguity policy in any of our trees because the set of search regions - corresponding mostly to the mobile game objects - is dynamic. Furthermore, it wouldn't be of any particular benefit to use the data points in the static trees as the search region distribution, as the majority of searches will be from the mobile objects, for things like collision detection and sight radii.

Thursday, May 15, 2008

Detox

Well, I've finally finished my last final of the semester, and the last homework assignment/term project was turned in last week. Now comes the much more pleasant task of purging myself of any knowledge acquired this semester. A list of some of the things I ought to work on this summer:
- Clean up and post kdTrieDemo
- Clean up and post TextBreaker
- Clean up and post the GUI code from MPQDraft
- Work on E Terra
- Do follow-up experiments to my AI term project
- Work on Secret Project V (no, that doesn't stand for "vendetta")
- Work more on my various languages

Though somehow I'm betting the only one I'll do in any great amount is:
- Play World of Warcraft

Saturday, May 10, 2008

The Story of Comcast

As companies like Comcast are increasingly in the news on technology-related news sources, some might wonder how the entire situation with Comcast came to be. Well, this abridged version of the actual shareholder delegate meetings in two acts might shed some light on the topic.

Act 1

Shareholder Delegate #1: Gentlemen, I propose that we advertise higher bandwidth, increase prices, and sign up more customers. Yay or nay?
Delegate #4: What is the business impact of this proposal?
Delegate #1: More money for us.
Delegate #4: Yay.
Delegate #3: Yay.
Delegate #5: Yay.
Delegate #2: Yay!
Delegate #5: I propose we increase network capacity to accommodate those additional customers.
Delegate #2: What is the business impact of this proposal?
Delegate #5: We'll need to spend some money in the short term to...
Delegate #2: Nay!
Delegate #4: Nay!
Delegate #3: Yay.
Delegate #1: Nay.

Repeat 37 times

Act 2

Delegate #2: Holy shit! We've got way more network traffic than the network can handle! It's strangling our network to death!
Delegate #4: This is a disaster! Quick, somebody find a scapegoat!
Network Technician: Well, it looks like BitTorrent is using up a fair amount of bandwidth.
Delegate #4: Kill it, quick!
Network Technician: BitTorrent traffic blocked. Network performance has returned to mediocre levels.
Delegate #2: Whew. Crisis averted.
Delegate #2: Now then, I propose we increase advertised bandwidth and sign up more users. Oh, and we can't forget to increase the price; we are selling a limited resource, after all.
Delegate #3: What is the business impact of this proposal?
Delegate #2: More money for us.
Delegate #2: Yay.
Delegate #5: Yay.
Delegate #4: Yay!
Delegate #3: Yay.
Delegate #5: I propose we upgrade our network to...
Delegate #2: I thought we voted you out months ago. Security!
*delegate #5 is dragged out of the room by security guards*

*cut to next business meeting*

Delegate #4: Gentlemen, I propose that we raise advertised bandwidth, increase prices, and sign up more customers.

*curtain*

This post inspired by Mac Chaos' various parodies over the years, which are probably better than mine.

Friday, May 09, 2008

Spatial Sorting with kd-trees - Part 2

Here's the paper itself. The teacher required that I use the ACM format, but I cut corners where possible (e.g. he only said we needed to have those four sections) :P I should note that the sections themselves are from specifications given by the teacher. I think if it were an ACM paper, or even if I was coming up with the structure myself, it would have been organized significantly differently.

Thursday, May 08, 2008

Spatial Sorting with kd-trees - Part 1

So, today I turned in my graphics programming term project... what's done of it, anyway. Spatial Sorting with kd-trees is the name of the paper/presentation; not quite as impressive sounding as my AI project, but then, this project as a whole is less impressive than my AI project (and my third term project even less) :P

Well, I was supposed to give the presentation today, on the last day of class. Unfortunately, due to gross lack of time, that didn't actually happen. If I recall correctly, 12 people were scheduled to go today, in 75 minutes of class time; that's about 6 minutes per person. Problem is, everybody made their presentations with at least 10 minutes in mind (not unreasonable), and it took everybody a couple minutes to get their Powerpoint presentation running on the overhead projector. By the end we'd gone from allowing the first 3 or 4 people to give their full presentations, to "7 minutes each", to "5 minutes each", to "3 minutes each", to "run your demo program and sit down"; and at least one person (me) never did get a chance to go (I'm not sure if there were others). So, I wrote the URL of my blog on the whiteboard and told people I'd post the presentation there.

The presentation itself is here. I'd recommend that anyone who hasn't seen it before also look at my previous description of kd-trees and kd-tries, as I'm not sure the slides alone, without the spoken part of the presentation, will give you a clear explanation.

In addition, the demo program is also here, compiled with XNA 1.0 Refresh and XNA 2.0. The space bar toggles pause (initially paused); the H key toggles display of the kd-tree divisions, simulated view frustum, and statistics about the search for objects in the view frustum (the statistics are, in order: number of objects in the view frustum, number of objects evaluated, the percentage of objects evaluated that are in the view frustum, the number of tree nodes navigated, and the ratio of objects in the frustum to combined nodes and objects visited); the arrow keys move the view frustum. I'll probably post a rant about XNA in the near future; just make sure you download the version of my demo for the version of XNA you have installed. I'll probably post the written portion of the project tomorrow, after I finish it.

I'm still hoping to post the source to TextBreaker and kdTrieDemo, although that's gonna be at least a week from now (at the earliest), as finals are next week.

Sunday, May 04, 2008

Orthographic Language Identification Using Artificial Neural Networks

Finally finished adding in the figures from the presentation that weren't in the original version of the paper. I have no idea why those three Visio figures are so ugly; they don't look that way in Visio, Word, and Powerpoint, but magically turn ugly when printed with PDF reDirect (which has worked well before those three figures).

Orthographic Language Identification Using Artificial Neural Networks

I'd like to post the full source to TextBreaker, but a lot of it was written in a hurry and needs cleaning up and commenting. Combine my infamous laziness (and past experience with MPQDraft) and time will tell if I ever get around to it :P

Saturday, May 03, 2008

The Grand Unification

The assumptions you start with can often limit the set of conclusions you are able to arrive at through logical reasoning. Computer science people were having a heck of a time attempting to adapt the binary tree - the standard for in-memory search structures - to media with large seek time, particularly disk drives. Progress was slow and fairly unproductive while the basic definition of binary tree held. Finally, somebody questioned the assumption and thought: what if we built the tree from the bottom up? And so the B-tree was born, and remains the standard in index structures to this day, with incremental improvement.

Other times, when creating, the assumptions themselves are fun to play with and observe the results. In Caia, I initially envisioned all of the major words - nouns, adjectives, and verbs - to be nouns. Nouns became adjectives when used with an attributive particle analogous to "having" (e.g. "woman having beauty" vs. "beautiful woman"). Taking an idea from Japanese, nouns became verbs by an auxiliary verb meaning more or less "do" or "make" (e.g. "make cut" vs. "cut"). Unfortunately, I ultimately concluded that verbs had to be separate, due to both practical concerns (specifically, concerns about making thoughts too long) and theoretical concerns (different nouns require different semantics, which would produce inconsistent theoretical behavior).

With another one of my languages, I took a different route, with some very interesting results. As this language is synthetic (unlike Caia, which is strongly analytic and isolating), I had quite a bit more flexibility. This language was actually modeled on the Altaic languages - Japanese, Korean, Mongolian, Turkish, etc.; as such, I suppose I can't claim that I invented this (what I'm getting to), but merely took what existed in Altaic languages and perfected it to a degree that doesn't exist in nature - at least to my knowledge.

The result is a language is which nouns, adjectives, and verbs are, in fact, all verbs; they are conjugated exactly the same, and play the same grammatical role. Even though this particular language is fictional, and I'm not expecting anybody to actually speak it, this idea might show up in other languages of mine (possibly a real one), as I find it exceptionally elegant. However, I do like to refer to "nouns" as substantives, "adjectives" as attributes, and "verbs" as actions; this is done because there are slightly differences in meaning between the noun bases in the three cases.

I explained previously that Japanese verbs had several base forms - usually distinguished by one vowel - which were then agglutinated with other things to form complex verb forms. I won't describe them again, as I use different names for the ones in my language, which might result in confusion. In my language, there are at least five different base forms of each verb: neutral, conclusive, attributive, participial, instantiative, and conjunctive (note that these names are not final, and I'm open to suggestions).

The conclusive form is the same as the Japanese conclusive: it's the main verb of the last clause in a sentence; it indicates the end of the sentence, and often has a number of suffixes indicating various details about the sentence. The attributive form is the same as one of the two uses of the Japanese attributive: it's the verb of a relative clause; adjectives are attached to nouns by forming relative clauses (e.g. "cat that is fat" vs. "fat cat"). The participial form resembles the second use of the Japanese attributive form: it is a noun referring to the act named by the verb (essentially an English gerund or participle, as in "watching FLCL makes me want to kill people"). The instantiative is unique to my language, and refers to an instance of the verb's action; for example, "a run" would be an instance of the verb "run". The conjunctive is similar to the Japanese -te form (and also includes the Japanese conjunctive base); specifically, it is used in verbs not in the last clause of a sentence (I'll come back to that). Finally, the neutral form is used in agglutination, and has something of a flexible, context-dependent meaning.

So, how exactly does this framework allow the grand unification? Let's look at an example of the specific meanings of the different bases for each word type (substantive, attribute, and action). Although I should note that not every base is necessary to unify the three; some are simply part of the bigger picture for the language.

For the substantive "human":
Conclusive form: "is [a] human"
Attributive form: "who is [a] human"
Participial: "being human"
Instantiative: "human"
Conjunctive: "is [a] human, and..."

For the attribute "fat":
Conclusive form: "is fat"
Attributive form: "who is fat"/"fat"
Participial form: "being fat"
Instantiative form: "fat thing/person"
Conjunctive form: "is fat, and..."

For the action "travel":
Conclusive form: "travel"
Attributive form: "who travels"
Participial form: "traveling"
Instantiative form: "journey"
Conjunctive form: "travel, and..."

Thus we are able to use identical conjugation for each type of word, treating the first two as stative verbs and the last as an active verb, in an elegant unified system. The real key to this, I think, was the separation of participial and instantiative forms. Note that not all actions have an instantiative form; it only exists where it makes sense: where something is produced or performed.

Now that I've explained how the unification works, there's just one more loose end to tie up: the meaning of the conjunctive form. This form is somewhat foreign to English speakers, because English only works this way in one of the circumstances this language uses it for (specifically, conjunction - e.g. "Murasaki is seven years old and [is] surprisingly well-spoken").

In English, when we have multiple clauses in a sentence that are related in a particular way, they are generally joined by some linker word that carries information about the relationship between the clauses; furthermore, the verbs in all clauses are conjugated normally. In Japanese, all non-main clauses are simply joined, often without any indication of what the relationship is (for matters of time, this is not that unusual; many languages lack such words); as well, the verbs in all but the main clause are deficient - they lack various things like tense, mood, politeness auxiliaries, etc. This is a matter of economy; all that stuff they stick on the verb at the end of the sentence can be rather lengthy. Thus it uses a generic verb form which in some ways resembles the -ing form of English verbs; this form indicates a conjunctive relationship between sentences (note that the literal conjunctive, as in the example a bit above, is actually indicated with a separate form in Japanese, appropriately known as the "conjunctive form/base"; what I've done is merged the two uses).

Here are some examples of things that would use this conjunctive form in Japanese. The first version is how it would be said in Japanese (note that I'm conjugating all verbs here, even though only the last one would be conjugated in Japanese); the second sentences shows how we would typically say the same thing in English.

Simultaneity: "I looked at manga and she looked at novels"/"I looked at manga while/as she looked at novels"
Coincidence: "I went shopping and ran into a friend"/"I ran into a friend when I went shopping"
Sequence: "I got a haircut, [and] went to the bank, and went to the supermarket"/"I got a haircut, went to the bank, [and] then went to the supermarket"
Consequence: "I overslept and was late for class"/"I was late for class because I overslept"

So that's all the conjunctive form is. On an interesting random note, you might notice that in none of those examples does the first version sound unnatural, and might very well be used by native English speakers in addition to the more precise second versions (though of course it would have sounded extremely strange if I had only conjugated the last verb, like Japanese does). This indicates that even in English this kind of vagueness is used; and for that matter, there are ways of indicating some of those relationships explicitly in Japanese, as well - they just aren't always used.

Monday, April 28, 2008

Random Linguistic Fact of the Day

An affix is something in linguistics which attaches to the word it modifies. For example, the English plural suffix 's'/'es' is an affix, as shown in "books on the shelf". The suffix attaches to the word made plural - 'book'.

A clitic is something that attaches to something other than the word it modifies. An example of this in English is the possessive 's. Adding that to the previous example gives "books on the shelf's". Here, the possessive clitic is attached to 'shelf', even though the word it's actually modifying (the possessor) is 'books'.

This is the technical term for what Trique uses frequently (and I didn't know the name of until now). In Trique, personal and possessive pronouns often become clitics when following certain other types of words. Trique also uses clitic doubling, in some cases.