Quicksearch

Dhivehi Phonetic (with Naviyani) Keyboard Installer for Windows

There is a small movement of people, especially from the Southern Maldives, that are calling for the re-instatement and celebration of the now discarded "naviyani" letter from Thaana script.

Naviyani used to be the 19th letter in the alphabet, placed between Daviyani and Zaviyani, until it was abolished in the early 1950s by then President Mohamed Amin. The letter represented a retroflex "n" sound, or "baru noonu" (heavy "noonu" character) as it is called in Dhivehi. The Unicode standard, used for text-representation on computers, did not include accommodations for "naviyani" when Thaana was first included in Unicode in standard version 3.0. The letter was eventually added in Unicode standard version 3.2 at code point U+07B1. As a result, many of the popular Thaana fonts have been updated in recent years to include the glyph for the letter. However, typing the letter has remained a hassle as the builtin Dhivehi keyboards on Windows does not map the letter to a key, forcing users to either type in the Alt + code combination or copying via the character map application.

I didn't realize there actually was a need for frequent use of the letter until various memes and pleas, from a growing community of people from the South of Maldives whose dialect apparently finds frequent use of the letter, cropped up on Facebook and Viber groups on the recent International Mother Language Day.

To ease the typing of the letter, I am releasing a Dhivehi keyboard input method for Microsoft Windows that adds naviyani to the standard "Divehi Phonetic" layout. Download the setup file from the link below and run it to go through breezy installation. You will need to restart Windows to get keyboard properly activated and accessible. You may then select the newly installed "Divehi Phonetic (Naviyani)" keyboard from the language settings under "Control Panel". You may disable/remove the built-in "Dhivehi Phonetic" keyboard option and use this instead as it is virtually similar in all other aspects.

When you have "Divehi Phonetic (Naviyani)" keyboard activated, the "naviyani" letter can be typed using RightAlt + n (or, alternatively Ctrl + Alt + N) key combination.

- Download Divehi Phonetic (Naviyani) Keyboard Installer



Hope this eases your work :-)

Filibari Keyboard for Thaana

I have just released a Thaana keyboard for Android called "Filibari Keyboard", featuring a new optimized key layout for faster and easier typing in Dhivehi.

This is probably the first publicly available keyboard designed specifically for efficient Thaana entry on mobile devices. Its experimental key layout is based on research data on finger reach and accessibility and Thaana character frequency analysis. The keyboard aims to place all frequently used characters within easy reach. Most notably, the layout places all the vowel signs or "fili" on a separate row at the top. The frequently used character keys are placed within natural thumb placement regions for further ease. I have a few updates planned as my time allows, with the new earliest release to add automatic diacritization, i.e. automatically adding fili to words when just characters are entered, which I wasn't able to finish polishing up for this release.

You can download "Filibari Keyboard for Thaana" on Google Play store now and should work on all Android devices running Android 4.2 and above. Since Android versions prior to 6.0 do not bundle a font carrying Thaana glyphs, you will run into issues of Thaana characters not being displayed correctly in apps that do not provide their own support for Thaana fonts.

Thanks goes to Asneem for the vibrant discussion that lead to this!

iOS users: I hope to push out a version of the keyboard for iOS devices soon.

Dhist launched!

During the Kickstart Hackathon 2015, Musannif and I spent a little while making a simple tool, which Musannif named "Dhist", to let you write, store and share Dhivehi text in Thaana using the web browser on the majority of the varieties of devices. It was written mostly to scratch our own itch but we welcome feedback and feature addition requests. Please share and use!

Check out Dhist

Integrating JTK with tinyMCE 4.x

Integrating my Javascript Thaana Keyboard library to handle Thaana entry within tinyMCE for a full-featured rich-text Thaana editor is very straightforward. You just need the following config in the tinyMCE initialization.

setup: function (editor) {
      editor.on('keypress', function (e) {
          thaanaKeyboard.value = '';
          thaanaKeyboard.handleKey(e);
          editor.insertContent(thaanaKeyboard.value);
      });
}


Enjoy!


My strategy for the lowest unique bid auction @ win.mv

So, I won a SMS-based “lowest unique bid auction” type game run by win.mv that had offered a nice quadcopter drone with gimbals and a GoPro camera. Saddeningly, some are unhappy with the outcome and have resorted to squaring accusations of cheating and insinuated that I had used illegal means towards winning. Some have even launched smear campaigns against both win.mv and myself via mass SMS and the Maldivian Facebook and Twitter spheres. Here, I’d like to clear up a few things…

My interest and approach to the game:


I am not someone who participates in raffles, lotteries (“naseebu numbaru”) and other types of competitions that are based on pure chance because the probabilities of winning one are so low and there is nothing one can do to increase their odds. I came across the win.mv advertisement on Facebook a day or so after it was launched and read up on what a “unique bid auction” is as it was the first time I had heard of the term. The realization that it wasn’t a game of pure-luck, the mathematical analyses mentioned on the Wikipedia page and the game theory-centric approaches discussed in the research papers I had found, piqued my curiosity and interest enough for me to decide to take a shot at it. I’ve wanted a drone for a while and having a good chance of getting one as reward for geeking out on an interesting mathematical/computer science problem had me hooked!

It is worth noting that a lowest unique bid auction is very similar to a raffle if the only information you are given is that your bid amount is the current winner – in which case you are down to making blind guesses and hoping you luck out. Some lowest unique bid auctions also run on the rule that submitting a new bid that is not unique while already holding the winning lowest unique bid switches you to the non-winning position – in which case participants tend to not risk exploring other possible bid values for fear of loosing some advantage they might have at some point. Hence, the exact implementation and the information provided during the game by the organisation running it matter a lot.

Information provided by win.mv:

The game run by win.mv was offering several bits of information that slightly swayed the odds for players.

  1. +/- < 1 range where the current winning bid was placed
    They provided this bit of information on their website for the current winning bid until the last few days of the game. +/- 1 is a very small range where the total SMS value to the player is RF 100/- to cover the entire range. One could send out submissions to cover this entire range and have a good chance of ending up with a winning bid. If you were to log this information frequently (like I did), then you can build up a map of the number line where gaps become apparent.

  2. Replies indicating whether the bid was > or < than current winning bid
    This is very helpful in quickly tracking down a range where the current winning bid is and was especially helpful once the website stopped showing the range of the current winning bid. For example, if you sent a submission of 10 and got a reply that it was lower than the current winning, then you could either step through incremental submissions, with a step resolution of your choosing, until you are told that your bid is larger than the current winning bid (or hit a winning lowest unique bid in the process).

  3. Replies indicating that you have a unique bid but not the lowest
    This is somewhat handy because you know you’ve struck a unique bid that can come back to your advantage if you or someone else knocks out the current winning bid by duplicating it. The strategy then may move to sounding out the winning bid using the process described in (b).

  4. Replies that your submission is rejected because you are the current winner
    I discovered this by accident but it was pretty useful. If you are the current winner and make a submission that is not unique then you not given a rejection reply but given the same message as (b) instead. However, if you make a submission that is unique, the system replies with the rejection message. This allows you to keep submitting and noting down bids that have a chance of being unique when used later if you lose the current winning spot.

  5. Duplicate bids
    They displayed this bit of dynamically updated information on their website until the end of the game and is a helpful guide for what bid amounts to avoid submitting to save your SMS expenses. If you were to log this information frequently (like I did), then you can build a list of bid amounts to not ever submit and use your budget more efficiently.



Observations/Assumptions:

All that information gives a good insight into the landscape of the game at any given time. But you do need a few other observations and assumptions to maximise your chances.

  1. The duration of game
    The win.mv competition ran for about a month (?) which gave plenty of time for even a few active participants to quickly use up more bid amount ranges (more time, more submissions).

  2. Number of people participating
    This is pretty important because, in combination with point (i), more people participating means a larger number of submissions and higher probability of a larger bid amount range being filled. However, given that Maldives is only ~300,000 people, of which a small subset will take part in the game, and this being the first such game by win.mv which probably would lead to many people being unaware or unwilling to take part, meant that the probability of the bid amount range having gaps was high - which is a good thing.

  3. Amount willing to spend
    It gets tricky here because the more the participants are willing to spend, the larger the bid amount range that will get covered. This then increases the cost of participation and winning. Having a good guess of what others might be willing to spend and setting your budget appropriately helps come up with a strategy that gives you a good chance of winning. For example, if you are willing to spend RF 100, and someone else is willing to spend just 1 RF more than you, the other person has a much better chance even with simple strategies. I opted for a budget of RF 3000.



Strategy:

There is no perfect play (a strategy that guarantees a win) in unique bid auction games but there are a few approaches you can take to increase your odds.

  1. Cover a continuous part-range of expected values
    This is a very good approach if you have a large enough budget. This approach involves sending all possible bid values starting from whatever max value you think will give you a good chance of winning as informed by assumptions (ii) and (iii) down to 0.01. This strategy means you will have to spend quite a bit upfront but means that other players have to send a whole lot of submissions to nullify your submissions and any gaps they leave will leave you a winner.

  2. Cover a large range with stepped values or random-ish values
    This approach is more budget efficient than (i) and involves making submissions by stepping through your values (e.g. 0.2, 0.4, 0.6 or 0.5, 1.0, 1.5 etc) or with random values that cover a broad spectrum of the possible values as informed by assumptions (ii) and (iii). If you loose the winning spot when someone uses up a gap you left, you can easily track it down and invalidate theirs by duplicating the bid.

  3. Mix of (1) and (2)
    It is possible to mix (1) and (2) for a double pronged approach that is even more budget efficient but at the cost of having to keep up with active play in the game till the end. This approach also carries much higher risk. I decided to use this method because it would cost me less and be a more fun computational challenge.


I used the logged information from (a) and (d) to optimize the bid submissions I made.

Tools:

Playing to win makes this game unplayable if you are sending SMS by manually typing it in, especially during the frenzy of the end of the game where other participants are all actively sending tens or hundreds of submissions. This is especially true for the strategies (1) and (2). You can gain a speed advantage by using tools to aid you. You can send out a large number of SMSes for this purpose using freely available SMS software hooked to your phone and MS Excel to list or generate the numbers or, if you are a programmer, write a few lines of code to automate most or the whole process.

Comment on the accusations:

One of the main accusations that is being levied is that I am friends with and colluded with Apo, one of the guys running win.mv, to rig the whole thing in my favour. Apo is an acquaintance, one of the many talented developers that I have had the fortune of meeting from the relatively small group of software developers in Maldives. He is not someone I hang around with at all or talk to often. I can’t imagine any reason that he or the other guys behind win.mv would have for rigging the competition in my favour.

The other accusation is that I used illegal means, somehow accessing or hacking the auction systems, to gain some advantage not had by others. There’s little I can offer than my word that I did not do any such thing but I heartily join the calls for an investigation by the relevant authorities to ensure there was no fraud or scam or illegal activity by any and all participants of the game.

It maybe worth noting that quite a few people complaining on the win.mv Facebook page and elsewhere, seem to have very little understanding of how a lowest unique bid auction works. It is complex and involved and there are common scenarios where a winner and a winning amount changing wildly can happen, especially under heavy submission traffic, and is hardly indicative of foul play.

---

In the end, I am not sure if it was all the reading and my imagined-clever strategy and system that helped me win or was just pure luck - I like to think my work helped - but I am sure I played fair and spent a lot for my effort. Judging by the hate and threats some people are spewing, I am better off never participating in these things in Maldives. Thanks for the lovely prize win.mv! :-)

Dhives – A free Dhives Akuru font

Earlier this year, Nattu and I took a break from work to work on something fun and different. The result: A Dhives Akuru font. We published this a while back at the Semicolon blog, I'm posting it here just for reference.



I admit the font is very unpolished. I should have spent more time cleaning it up but I had to spend a whole lot of time reading up, learning how Dhives Akuru works, finding sample characters etc. I read pretty much everything I could find on Dhives Akuru on the web and learnt a whole lot about Dhives Akuru along the way. And it is a complex beast.

Dhives Akuru is the script used in the Maldives until it was replaced officially by Thaana as the official script for Dhivehi.

Use:

Using Dhives with the font is pretty straightforward. We have mapped the characters phonetically like the popular Thaana keyboard mapping. Except for the several scenarios involving conjuncts and combinations requiring the use of ligatures when designing and building the font, which has been skipped, it is just like writing Thaana (or so we believe!).

Download:
- Dhives – A free Dhives Akuru font

Thireefili: An experiment in removing the bottom diacritics in Thaana

This follows from a little chat Hamid Shafeeu and I had last night. Hamid suggested that the vowel diacritics written on the bottom of the letters in Thaana, the "ibifili" and "eebeefili", should be moved to the top to make the writing look cleaner (and other reasons he offered that I can't remember now). Anyway, the move requires minor changes and should be pretty apparent and easy to learn.

I've altered the FDL licensed "Thaana Unicode Akeh" font by "MITF" to bring the ibifili and eebeefili to the top and laterally inverted them to differentiate from the abafili and aabaafili vowel diacritics. The resulting font which I've called "ThireeFili", is available for download below. The font is free and is released under the Free Documentation License which it's ancestor follows.

I do not particularly like how the two new fili looks but I think moving the bottom diacritics to the top definitely brings a readability improvement. What are your thoughts?

- ThireeFili TrueType font (Thireefili.ttf) - 19.3 KB