Showing posts with label programming. Show all posts
Showing posts with label programming. Show all posts

5 Jul 2010

Computers deciphering languages


On June 30, there was a news release about how a computer program has managed to mostly decipher Ugaritic "on its own" (that is to say, re-decipher for the pursuit of computer science advancement). This was already discussed on Memiyawanzi and Abnormal Interests but I feel I should add my two cents considering that I involve myself in both linguistics and computer programming on this site.

When I was still in French-immersed gradeschool, I learned quickly that English words don't map nicely to French words in phrases all the time. One clever teacher encouraged me to think of an English joke and to try to translate it into French. As she anticipated my reaction, she delighted in watching the personal discovery she had abetted unfold all over my face. Naturally, the puns on which my joke relied had magically lost their meaning and I realized then very early that translation is quite complex. Unfortunately, many others in adulthood have never taken the time to think about just how complex translation really is. Many people who are monolingual especially have little experience to go on to understand just how difficult this task really is and just how amazingly effortlessly the human brain solves many problems.

And after programming things like the online Etruscan dictionary, I can say with some degree of experience that trying to machine-translate something using simple one-to-one mapping algorithms between languages produces ludicrous Babelfish-like results (eg. 'What is on television?' becomes *'Qu'est à la télévision?' on that site for some reason). Even when AI algorithms are added to improve results, the translations are still nowhere near as competent as produced by human beings because they are unequipped to overcome gaps in knowledge or ambiguities in speech like plastic brains can. Historical translation becomes all the more complex because there are even more unknowns involved.

The article is interesting but I feel it's a lot of pompous hype from an institution that is no doubt pressured to come up with innovation after innovation, or at least to look like it is. The realistic limitations of this program can easily get misconstrued. What I think will be the truely noteworthy innovation to this complex goal of machine translation is a very general pattern-recognition algorithm, one that doesn't require the guidance of researchers or the programming-in of added assumptions to find and discover new patterns. Yet, if programmers could accomplish that, we'd not only have a fancy translator algorithm but a fully fledged digital human complete with the beginnings of artificial intuition. Until then, these programs are in no way a replacement for human beings and any talk of that sort is more relevant to sci-fi than current reality.

26 Jun 2009

Sinat - Graphics revised and computer algorithm enhanced

I've recently updated the graphics of my Egyptian game Sínat to look more 3D. I got tired of the flat, spartan look of the Flash game and decided to fiddle around with a 3D modeler called Swift3D to see what better things I could come up with.


Also, I've updated the strategy of the computer which I believe may be better than what I have so far. My new algorithm, which I call Seth (named after the Egyptian god of storms and chaos), first checks to see if there are any pieces to switch with the opponent. If no switching is possible, it moves the first piece closest to the end that can legally be moved. Of course, all of my programs now automatically avoid Par Maw (the water square) at all costs since its a penalty square. After testing 25 games, the new algorithm won 68% of the time against Lateesha, the "retarded monkey" algorithm that moves completely by random. Not only does it win more of the time but it wins by an average of two pieces against random play. Adaptation makes me giddy.

11 Jun 2009

Sproutbuilder ate my Flash game


Warning: The following will be a scary tech rant about how peeved I am at my recently disappearing Sinat boardgame on my blog and this business about what I call "Flashphobia". If you're not a Star Trek-loving geek like me, you may get bored with this post.

Anyways, it's looking now like Sprout Builder decided to go to a "paid model" and in the process destroyed any content links I or anyone else had associated with the company to effectively boost its traffic. Evil marketing? Just possibly. But possibly also bad marketing. At any rate, now my Egyptian Sinat boardgame I coded for you all is just *blank* when you go to my Extras page to the right. Thanks Sprout Builder for erasing my content. I'll be sure to sign up for your service... in hell.

Now I have to search for someone, ANYONE, that will house flash files for free (just like they do for pics and text) without imposing an irritating limit on format type for no clear reason. Blogger won't allow flash files. I can't even figure out what the big fear is about Flash programs when we have so many evil websites underhandedly exploiting HTML/CSS bugs that introduce viruses onto our computers every day. Why then is Flash so particularly evil? Because it introduces functionality to otherwise drab websites? Whatever.

Seriously, does anyone know where one can put their Flash programs on some free account without idiot marketers pulling the rug under their feet and forcing pay models down their throats? And what's wrong with Google that it can't do this? Picasa is effectively a picture storage system so where's the flash storage system of my dreams? Did I miss a memo somewhere or is the internet retarded? Grrrr.

And that's the end of my geek rant for now. Hehehe.


UPDATES
(Meanwhile an hour later...) AHA! Eureka! I've uploaded my game's swf file to my new Google Sites account...
http://sites.google.com/site/paleoglot/Home/sinat.swf
...and this seems to link alright {crossing fingers}. Tell me, viewers, if you have any problems accessing the game. If everything is okay, then I guess Google does supply a solution to Blogger's lack of services, albeit a really friggin' convoluted one for even veteran computer programmers to wrap their noodle around.

19 Mar 2009

Reconstructing strategy in the game of Sinat

After commenter Hans told me that my Sínat game wasn't playing up to par with him, I decided to see whether I could code a better strategy into the game. I figured it shouldn't be hard to make an improvement. Afterall, the only thing the computer is programmed to do is to find a list of available moves and then pick a move randomly from that list. How could any strategy be worse than that?

A few days ago, I coded a new strategy on my computer to test out. Basically I told my program to evaluate each move and favour those moves which yielded greater protection of one's own pieces at the greatest expense of its opponent's protection. Seems right, yes? Apparently not. After I played the game, I still came out on top without much fuss and that got me a little curious.

So I decided that I would seperate my random algorithm from this new algorithm and have them battle it out. I called the "random" strategy Lateesha, for kicks, while I baptized the other "protection" strategy Shanequa. With Lateesha in red and Shanequa in blue I unleashed the two algorithms against each other for 20 turns to see what the statistical outcome would be.

The results were surprising. Our ol' lady of the block Lateesha won 55% of the time (11 out of 20 moves) over the new kid Shanequa!! What?? Yes, apparently randomness is better than being protective! It appears that this game does not reward overcautiousness because by being too focussed on one's own protection, one's pieces will be slower to get to the end of the board while one's opponent's pieces may pass one by. As a result, I've so far changed nothing in the A.I. programming.

Now I have to think up a better strategy. Back to the drawing board.

27 Feb 2009

An Ancient Egyptian boardgame to appease readers


After a shamelessly long period of inactivity here on Paleoglot due to partying, Valentine's Day, joining the Aegeanet forum (possibly to my chagrin), a bit of laziness, a nasty chest cold, and obsessively programming my own game of Sínat (an ancient Egyptian boardgame) while experimenting with the Adobe-Flash-yumminess of Sprout Builder, I have yet to reorganize my blogsite like I wanted to and categorize my various files and such (Etruscan Dictionary pdf, hypotheses on Pre-Proto-Indo-European, and now this Sinat game) under more easily accessible links from the main page. Unfortunately there are only 24 hours in a day, yet I need 8 to 10 hours of sleep or else I get crabby. Go figure!

At any rate, for now, please help me test out my game (the link is down below). Some of you may be confused by my spelling of the name. Normally people spell it "Senet" but this is the annoying "Sir Budge" way of bastarding the Egyptian language by lazily imposing the vowel "e" between written consonants. Remember, afterall, Egyptian seldom indicated vowels in hieroglyphics unless writing foreign names like that of the legendary Ptolemy known as Cleopatra who was of Macedonian heritage. The name of the game literally means "passing" and since it's related to Coptic šina "to pass", the name in Middle Egyptian (that is, the language as it was spoken around 1500 BCE or so) may be reconstucted as *sínat.

I have lots more to say about this interesting game such as mythical symbolisms subtlely embedded into the design of the game, Kendall's rules on which I base my program, some minor reinterpretations of game rules that I needed to impose while coding the details in order to keep it from being laborious, etc., etc. Consider this game a "beta" version and I'm aware of some bugs (e.g. the "Roll Dice" button flashes pointlessly in computer vs. computer mode) but despite my hideous programming, I believe it should now be playable with a friend or alone with the computer without exploding. However, fear not, friends. This is *not* the final product yet and I will be making modifications to the programming and visual aesthetics as I go along until I'm reasonably satisfied that I've ironed out all usability issues. As I said, the rules are more or less that of Timothy Kendall and a short primer of them can be learned from this link. I use the 5-pawn variant rather than 7 although it sounds like 5, 7 or even 10 pawns were used by Ancient Egyptians.

Now relax yourself this weekend and...

Try a game of Sínat!