Tuesday, December 15, 2015

Let's talk about Christmas (Origins, Atheist Response, and Santa Claus/Wonder)


Christmas and Atheism
Quite a while ago, I saw somebody on the internet suggest that atheists who celebrate Christmas are hypocrites. This is simply not true. Christmas has become a cultural holiday. It's become a holiday about spending time with your family, bringing gifts. It's also a holiday of rampant consumerism and very random traditions. If an atheist is a hypocrite for celebrating Christmas, then Christians are extremely hypocritical considering the non-Christian roots of Christmas. It makes perfect sense for an atheist to take the best parts of whatever religion has to offer (if we can even say that Christianity "offered" us Christmas). Coming together and enjoying life and having a good time shouldn't be something only for the religious. If I listen to a Christmas song, I do so because I like the way the track sounds. I do not agree with every lyric of every song I have in my collection.

There's nothing wrong with choosing to be with family and friends on a Christmas Day. Religion does not have a monopoly on getting together on a specific date. Similarly, the Jews do not have a monopoly on latkes in December. I can cook up potato cakes any time I want. The only thing that would make me a hypocrite as an atheist would be to believe in god. The only thing that would run contrary to the spirit of many atheists would be to believe things without sufficient evidence.

"War on Christmas"
A while back Donald Trump bemoaned the fact that Starbucks' coffee cups did not contain the phrase, "Merry Christmas". He suggested a possible boycott of Starbucks over this and said that if he were president, we would all be saying Merry Christmas again. Obviously, these are thoughts of an imbecile. But I also wonder how far Trump is deviating from his normal self to pander to the super religious party that is the Republican Party. It's also unclear to me how Donald Trump plans to  make more people say "Merry Christmas", but I suspect it would be legally sketchy.

Of course, Christmas is not under any threat. The days leading up to it remain one of the most profitable times of the year for retail stores. In a way, Black Friday unofficially marks the start of holiday season, and Christmas is the largest reason why this time of year is considered a holiday season in the first place. In that sense, the days leading up to Christmas are not only the second most profitable days for stores, but also the most profitable at the same time.

While the percentage of Americans that polled as Christians fell from 78% to 70% over the last 7 years, Christians still remain the majority of the United States and by far the largest religious group. In fact, the United States is the country with the most amount of Christians in the entire world. Despite how common Christians are here, they find a way to be disproportionally represented in government. If there really is a "war on Christmas", it would be a war that can't be won.

What exactly is a "war on Christmas"? Some cite the trend of saying "Happy Holidays" instead of "Merry Christmas" to be part of the war. While I personally do not care if somebody says "Merry Christmas" to me (I try to think about the intentions of the person uttering the phrase instead of what they're actually saying), it makes sense to say "Happy Holidays" as it includes more people. If somebody doesn't want to switch to the latter, then call it for what it is: laziness. There's nothing righteous about the utterance, and sticking with it just makes you stubborn. I don't think much rides on this utterance, but I'm not the one complaining.

While I believe the Constitution shouldn't be a holy grail simply because it was one of the founding articles of our nation, separation of church and state is a solid concept that stands the test of time. If we are going to allow Christian decorations in government buildings and public areas (including the more religious ones like the Nativities Scene), then we should allow all types of religious displays. The people of Fox News don't seem to agree. In their twisted world, criticisms of Christmas decorations in public schools is a war on Christmas, yet criticizing Satanists when they want to do the same is not. Angry people ran to social media to exclaim that Obama is banning God and Christmas when people found out that a memo was sent to people working in Veteran Affairs locations, reiterating their policy about religious symbols in the offices. What the angry mob on Twitter don't realize is that the policy wasn't even Obama's doing. Furthermore, some of the rumors spreading on social media alleged that the phrase "Merry Christmas" was banned in VA offices. This is simply not true.

It seems that many Christians need something better to do in the holidays. They are either too easily misled, too hysterical, or too dishonest.

Christmas, the Holiday Itself
Just some light-hearted history now. :)



The Roman Pagans had the celebration of Saturnalia, a festive period of lawlessness where nobody can be punished for damaging property or injuring people, and everybody got nice and drunk. The Christians wanted to convert some Pagans, so they promised the continuation of the celebration. The problem of course, is that Saturnalia wasn't and isn't a very Christian holiday. And so, on the end of Saturnalia, it was declared that Jesus' birthday was December 25th (which is false). Some of the Christians had their fun by making Jews by forcing them to race the streets naked. Eventually the Jews got tired of being treated like shit, so they rebelled... But not to a great effect. In one incident, multiple Jews were murdered, many maimed, and many women raped.

The Christmas Tree probably (and I say probably, because history is hazy at times) originated from the trees which Pagan worshipped. The idea of kissing the mistletoe came from Norse mythology, where the god Baulder was killed by a mistletoe by rival god Hoder while fighting for the female Nanna. Druid rituals used mistletoe to poison human sacrificial victims. Kissing under the mistletoe may be a fushion of these two ideas. In pre-Christian Rome, the emperors demanded gifts and offerings from the most despised citizens during Saturnalia (December) and Kalends (January). It later turned into gift giving among normal people.

Nicholas was most likely born in Parara, Turkey in 270CE. He later became Bishop of Myra and died on 345CE. Over a thousand years later in the 19th century, he was named a saint. Nicholas was a senior bishop who convened in the Council of Ncaea in 325CE. The text they produced considered Jews to be 'children of the devil' who sentenced Jesus to death. In 1087, a group of sailors who idolized Nicholas moved his bones from Turkey to Italy. There Nicholas was superseded by Pasqua Epiphania ("The Grandmother"), who filled children's stockings with gifts. As the Nicholas cult spread northward, German and Celtic Pagans began to accept it and merge it with their own gods. Woden as among them and had a long beard and rode a horse through the heavens. Nicholas merged with Woden, discarding the heavy Mediterranean appearance of Nicholas. While Nicholas' death was December 6th, the Christians moved the relevant date to the 25th for reasons previously mentioned. The name, "Santa Claus", came from a satire written by a Dutch novelist. The idea of portraying Santa Claus as a man riding eight reindeer, going down chimneys, was invented by Dr. Clement Moore in 1822 and later stories by other people gave Santa a home in the north pole. Finally, in 1931, Coca Cola hired an artist to draw Santa Claus. The artist modeled him after his friend, and bam - Santa Claus was born: A blend of Christian crusader, Pagan god, and commercial idol.

Credits to SimpletoRemember.com for their work.

Santa Claus and Wonder
I do not pretend to say that teaching kids that Santa Claus is real will have a negative, long term impact on those children. On the other hand, I think it's best to drill in skepticism and a drive to look for evidence despite what one wants to believe. I have a friend that would teach his kids (if he had any) about Santa Claus. We are both atheists (even though he would disagree), so what gives? The idea is that kids have a sense of wonder. And imagination. He wants to give his (hypothetical) kids a sense of wonder by telling them about Santa Claus.

I have a different view on this topic. If I am asked by my (hypothetical) child whether Santa Claus exists, I would ask him/her how one would go about figuring that question out. I think it would a good exercise in the scientific method. That doesn't mean that the child's world will be forever grey, with just hard logic, slipping into nihilism.

What my friend is implying with his sentiment is that children have a sense of curiosity and wonder that is lost as they age. I think the real question is why this transformation happens. Neil deGrasse Tyson believes this happens because adults tell children to stop being curious. Don't pluck the petals, I just spent money on that. Don't play with the egg. Everything is a don't. In essence, he believes that adults beat the curiosity out of children. You need curiosity to go with your wonder.

One thing I don't think is the answer to this problem is to teach kids to believe things on bad evidence, and then watch the rest of the world take away their Santa Claus when they get older. Even if that helps, that's temporary unless you want the kid to believe a new piece of nonsense when their last belief gets squashed by reality.

Believe it or not, there is something more wondrous than Santa Claus. Yes, there is. Did you know that we are all glowing, just not in the visible part of the electromagnetic spectrum? That is why some cameras can see us through walls. If we were hot enough, we would glow... brighter and brighter, until the color changes and the light goes outside of the visible spectrum once again... Ultraviolet. X-rays. Gamma rays. Eventually the wavelength of light will be so small, it will be as small as Planck's Length, where space itself might get foamy and vague.

Did you know that the reason why astronauts feel weightless onboard the International Space Station is because they are falling? They are constantly falling, but they are moving fast enough to fall away from the curvature of the earth. Move too slowly and you simply fall back down to earth. Move too quickly and you leave earth's orbit. Go at just the right speed, and you will fall for what seems like forever.

If you think about all the poetry, music, stories, and emerging types of art and art yet to exist, if you think about the greatest and the worst things humanity has done... If you think about how big the world is, with black holes which warp time itself, to the microscopic, where there are more bacteria in you than there are your own cells, to all the discoveries we will make and all the cultures and beliefs and philosophies people lived with, I think you will find that the world is the most amazing thing ever. The answer has been staring in our face the whole time.

With that said, please take time to watch the video below.


(To view in a higher resolution, click here: HERE.)

Tuesday, November 24, 2015

Mugen, Mugen, Mugen

Today I want to talk about a project I've been working on for the past weeks. The first half of this post will be about Mugen in general. The second half of this post will be about my testing of Mugen.



Mugen is a 2d fighting game. The character and stages included with the game are very bad, but that's not the point. Mugen allows people to make their own characters, stages, motifs, and set up their own music for stages and menus. A motif is a set of files that dictates the look and feel of the stages, health bars, and so forth. Many authors have ported over many characters from other fighting games, like Street Fighter or King of Fighters. I'm more of a fan of the latter myself (as you can see later from my roster of many Iori edits). This freedom allows people to showcase their coding skills, artistry, and creativity. Some characters are totally made up. Some are crazy edits of characters from other franchises. Those can vary from characters who have abilities from multiple games in a franchise, to a fusion of two characters, or any other whacky combo - including brand new attacks, effects, sounds, etc. With so many different possibilities, it can be hard to keep track of the characters, so I have named the characters according to the character and its author.

The downside is quality control. It takes a skilled coder with attention to detail and a ton of free time to emulate the characteristics of a character from a game. Problems from improper coding (which, when interacting with any of the thousands of other characters that are coded differently, compounds the issue) to unfaithful combos and damage values exist. Due to this, even when two skilled coders try to port a character over to Mugen as faithfully as possible, inevitably both characters will play differently, if not just for the AI.

Authors might decide to leave the Mugen scene, letting their download pages die out. "Warehousing" these characters in a seperate site to download is a solution. There are a few sites that are dedicated to storing a ton of Mugen characters. There are two problems here: 1. No matter what, quite a few characters slip through the cracks, with no download links. And if nobody is around who is willing and able to share the character they downloaded before all sites went down, then the character is unobtainable and lost. 2. Warehousing is nice, but can contain old versions of characters. If the author comes back or was never gone, often the characters stored in such warehouses are old. This could be frustrating to the author, since the author knows that quite a few people are using an old and possibly glitchy version of their work, and their new fixes and updates never went to most people.

Then we have privacy. Some characters are private, and some authors do not allow others to reuse their work. Some people are against "illegal edits" of other people's work, while others prefer a free-for-all. Some characters are hard to obtain, and the people who hold them are only willing to trade characters instead of freely sharing. My opinion for all of this is that Mugen should be about sharing. Nobody has a commercial interest, so what's the big deal?

There are AI patches for characters with crappy AI, but once in a while, I come across somebody who did more than change the AI. Without clear documentation in English, it's hard to tell what's going on. That's another thing: To read all the Mugen sites and documentation, I have to translate the words, and some of the stuff don't even display properly on my computer.

Crappy edits are a dime a dozen even though edits take a long time to make. On the other hand, beauty is the eye of the beholder. Some people want overpowered, super-flashy characters. Some want very accurate port of characters from a game they like. Some people like hybrids or want to see something totally new. Some people want Hentai Mugen. There's something for everybody, and people should be more polite in their critique of characters they don't like.

With a roster size of 150 and 120+ characters, you can imagine that it took quite a while to assemble the roster. There are quite a few characters I don't use for one reason or the other. The character might be ridiculously overpowered, or it might be too glitchy. Or maybe, I have another version of the character I prefer. Or, the AI is crap. You can't have a fun viewing experience if the AI is crap. Auto-regenerating health is also a no-no except for a few cases. And finally, attacks that do damage as a percentage of enemy health are also a big no-no. The author often wrote the attack assuming the user will be using sane health values. What if I don't wanna? ...Then you start editing the code and hope you find out how to get the character to work the way you want it to.

Some spent a lovely afternoon hiking. I spent it deciphering hieroglyphics.



In the picture above, you can see what my roster really looked like 2 months ago. Notice that the roster, while large, is not fully filled. Also notice how the character portraits for the two characters are not the same size or quality. I actually had to learn how to take a picture I found on the internet, apply transparency, and alter the character files for the picture on the right to show the way that it did. Anyways... I spent quite a while modifying the roster screen above. I got the motif from SxVictor, who does very artistic motifs. They all have an Anime feel to it though. However, I found this one to be fine for my purposes. Here is how the roster screen looks like unedited:





















Quite a contrast, no? And below is me editing the portrait picture of a character in Gimp. The problem is that most pictures come with a background, be it a picture or color. Having a white background means the white background will show up when the character is displayed. It looks very ugly because it shows up as this white patch of area. It stands out. So, I had to find a way to remove the background and apply transparency.



Ever since Winmugen turned into Mugen, Mugen has become a lot better to play or watch. Winmugen used to crash all the time and run in a shitty low resolution. Now, 720p can be done natively with many motifs, but 1080p or higher upscaling is also an option. I mentioned "watching" the game. That's how I typically experience the game. I like to watch AI vs AI matches. (2 vs 2 matches causes utter pandemonium!) So as you can imagine, I want a large variety of characters to make things interesting. And, I want the characters to be sorted by order of strength on the roster.

This wish is far harder to grant than you might think. It’s certainly was for me. The roster started out being sort-of in order of strength, but there are holes. That’s because when I added a new character to the roster, I did do checks to see where I would place the character in the roster. The results were never documented however, and the testing methodology was flawed.

Basically what I did was, I took a picture of the roster and I would pit a character against another. Of course, winning depends on AI along with the abilities of the character. A would be pit against B. I set the HP in Mugen to 1000% hp or so forth, so that each side has HP that is so high, it can never be depleted. When A has a 30,000 hp lead over B, I consider A to be stronger than B. And if that happens and I am testing A against the rest of the roster, I would bring up that picture of the roster and draw a check mark on the face of character B. I would start from the bottom up. It’ll start with all wins, and a loss here and there, and then, generally an equal amount of wins and losses, and then all loses pretty much. I would assume a win cancels out a loss, and see what the highest spot I could place the character would be given those rules. There are ties, in which case I had to randomly decide.


This is an example of a roster picture used for ranking characters in the old method.

The new method is very different. First, a separate Mugen setup has been set up, with custom settings to try to facilitate faster testing. For the first half of the testing, I used the same 30k HP lead idea, but with major differences. This time, wins and losses are charted in a giant 150 x 150 Excel spreadsheet. It was surprising to me that I ever had to use vertical text alignment seriously in my life. 150 x 150 is a HUGE spreadsheet, too large for 1440p screens to show. However, I only test characters in a general area of the roster at a time. I just need to show a part of the spreadsheet to be able to do my work. The spreadsheet took many hours to make, and I colored the spreadsheet in many colors to try to prevent confusion about which row I am on. A 1 means a win for the character who’s row corresponds to that cell. A -1 means a loss (and conversion can be done easily via copy, paste, transpose, multiply by -1). A 0 means a draw (too close to tell) or a fatal glitch. One common glitch is where one character punches the other endlessly since the opponent is backed into a corner. This is due to poor coding. To allow the pairing to fight, I have two stages for testing: A normal stage, and a never-ending stage which scrolls on both sides forever, making cornering impossible. I use the latter sparingly, since the nature of the map can affect AI. In rare cases, a character with a move that slams the opponent to the corner, will continue flying, trying to get to the edge of the map but failing forever due to the infinite scrolling nature of that map.

Running Mugen 20 times at one time causes me to encounter far more glitches than normal usage. The obvious reason is that there are 20 instances of the game, and therefore a x20 time chance of problems. Running so many at a time might also glitch things out, because this is a very extreme scenario. If one of the 20 instances bugs out or dies on its own, it is hard to spot the problem early and fix the problem.

Above is one type of glitch caused by poor coding.

Consider the advantages of a spreadsheet over that of the picture method. For the picture method, a picture needed to be done for each character on the roster. What happens if I added a new character and the entire roster moves around? What happens if the ratings get sloshed around with future corrections? There is not much I can do. With a spreadsheet, the fix is much easier. A spreadsheet also lets me look at more data in less time. It is, however, more prone to misreading.

A bit after halfway, I realized that my results against two characters were wildly different. I detected a 40k HP variance between two tests. Bear in mind that so far, all the tests had a sample size of one. I could not think of a way to conduct more tests automatically anyways. Doing 50 fast tests is far more of a pain in the ass and far lengthier due to manual adjudication than doing 1 really long test. Anyways. I accidently tested a pairing twice and found that 40k HP variance and I realized this was not acceptable.

It was crushing, because the prospect of losing over a hundred hours of work is painful. Good things came out of that problem however. I went back the drawing board and remembered that AI vs AI matches typically end on a best-out-of-3 basis. I don’t see that in action because during testing, HP is set to insane amounts. But what if I lowered the HP amount and found a way to make it best-out-of-500? Then I would have automatic testing between to characters, round after round. I also did some further optimizations of the settings in Mugen. Each side gets 10k HP, and the first person to deplete the other person’s HP to 0 gets a point, and the round restarts. This many short games method is in direct contrast to the infinitely long game idea I had at the start. (If I set the number to 1000 HP or below, weird things start happening because the super of a character might do more damage than either side's entire HP, meaning that the game is won whether the damage is 1000 or 10000. In a longer game this of course, matters.)

What I found out was very interesting. One of the characters I tested had a feature called “grooves”. It’s basically a system that allows multiple modes for a character, altering its abilities and so forth. This is the reason why I got wildly different results from each simulation of the pairing to the next. When I tested A vs A, the crazy outliers disappeared. However, I realized eventually that player 1 somehow has an advantage over player 2. That’s right: If you test A vs A, the A that starts out on the right always gets the upper hand. This was replicated in over 2000 games. To compensate for this, what I did was run each pairing with a pair of simulations: A vs B and B vs A. Their scores would be added up to get the final score. It’s handled like in chess, where white gets the advantage.

The groove problem I noted with one character was not controllable. There is no way to select the groove for that character. Therefore, I cannot consistently test the character. This brings up the fact that despite all the procedures I've laid out thus far, there is still room for spur of the moment decisions. What do I do with such a character? Or, what do I do with a pairing that is glitchy, but just about stable enough to test but very barely so? Later on, I realized that the gets-opponent-stuck-in-corner-leading-to-inifnite-combos glitch won't easily show up in many-short-game testing because the game would be won and the next game would start. Whereas with the infinity long game method, I can easily see a character punching the other in a corner endlessly.

One idea suggested by others in TCEC chat was to use a program that looks at the length of the health bars. This doesn’t work because of the high amounts of HP, which leads to the health bars glitching out. Mugen wasn’t designed to have both sides with 1 million HP, so I can cut Mugen some slack there. Without a way to grab the health values of the two sides (whether by reading the video with software or through some type of setting or log), automation becomes impossible. Oh yea. You might be wondering what TCEC chat is. TCEC is a chess engine competition, and while the Mugen testing was going on, I was in the chatbox there a lot. Naturally, I brought up this enterprise to the chatbox.

I decided to continue testing with the newest method, with many short games and two simulations per pairing with sides alternating, but not to redo all of the work I did earlier. Because I started this method halfway, I cannot log the wins-loss info into the spreadsheet, because then half of the spreadsheet would be 1, -1, 0, with no win-loss data available, while the other half would be like 50-25, 35-36, etc and the data wouldn’t conform. This makes it hard to consider the nuances of the results. If both A and B defeat everybody else, but A quickly runs down the opponent while B takes a while to edge out, A would be stronger. Just imagine if A and B were equal due to AI quirks or coding quirks. By the current system, A and B would be equal.

I implemented the newest method as follows: Person 1 vs 2, 2 vs 1, 1 vs 3, 3 vs 1, 1 vs 4, 4 vs 1, and so on. And if one pairing is done, I slide the number one higher: Person 2 vs 3, 3 vs 2 after I am done with 1 vs 2, 2 vs 1. That way, I don’t have to keep track of who is fighting whom. Once a pairing is done, I test the characters one to the right of the characters originally tested when looking at the roster. No need to reference the Excel sheet to figure out what needs testing. However, once again, the shitty Windows UI makes my life tougher. Due to the amount of games run, some instances Mugen will be nonresponsive some of the time, even if just for a split second. This causes Windows to move the icon for that Mugen to the end, messing up my order. There’s not much I can do for that.

I work on the weekends, and during those days I am not in front of the computer micromanaging Mugen, switching pairings and charting results. With the neverending match idea, it was tougher to use that time effectively, because if too much HP has been depleted on both sides (after both sides have lost ~200,000 hp or more), the health bar glitches out. With the many-short-matches concept, that's not a problem. The results just keep getting tallied for me. This helps crack down on the ties. One final thing that is different about lots of short games vs one very long game: A few characters have abilities unlocked only when health is under a certain threshold. This is not reflected in the never-ending game format, giving them an unfair disadvantage. One thing in common with both approaches is that in both cases, the cutoff where I consider one guy a victor, is really kindda arbitrary. 30k HP lead is quite a lot (let’s say, each attack does 100-500 damage, to simplify) when 1000 is the default amount, to be sure. But why 30k HP? Why not 35k? The question can be asked for the many-short-games approach. When do I decide a victor? I can use Ordo to try to analyze the Likelihood of Superiority (LOS), but that’s too time consuming.

Mugen running 16 times at a time was the limit, due to running out of Vram long ago, even on my 980ti, which sports 6gb of vram. The CPU was chugging along too slowly past that figure anyways. And finally, the Aero preview of icons on the taskbar maxes out at 16 for a 1440p screen. Any more, and everything ends up listed in a terrible way... No previews, just a lot of freezing, messy applications. I got around this limitation in part with optimizations in the settings of Mugen, and Windows 7 Taskbar Tweaker, which allows me to ungroup programs which are similar yet still only show the icons. This shifts the bottleneck to the CPU and allowed me to run 20 simulations of Mugen at a time. More cores would help greatly, since I only have 4.

Above is me working on testing. Notice the icons: Not grouped, but no labels due to Windows 7 Taskbar Tweaker. Red numbers in the chart means a glitch occurred.

What is 'casting a wider net'?

In chess, a 2500 engine might lose to engines around its rating but still maintain that rating due to its ability to constantly beat weaker engines. This is usually due to contempt, where an engine values its pieces more than the opponents, causing the engine to avoid trades in material which lead to a more drawn game. Well, in Mugen it’s like that, but due to the intricacies in character abilities, AI, and character coding, there are countless ways to cause A > B > C > A. You can’t optimize against every type of AI/coding/character ability configuration. So what do you do? 

Ideally you want a round robin, where every one of the 150 characters have faced off against the other characters on the roster. But that takes a very long amount of time, and most of the results are useless. I don't need to test anything to know the guy in first place who is smashing every single opponent it meets in the top 10 spots will defeat the guy in last place. (Note that ratings are closer together towards the center of the list, and on both the extreme high ratings and low ratings the elo ranking between each character increases as everything blows up to the extremes.) There's a lot of wasted time testing pairings I already know the results to.

On the other hand, if I overestimate my ability to predict outcomes accurately, then I end up faking results or not bothering to do tests which actually lead to an upset. So what I want to do is test 30th place guy against anybody that's ranked 15th-45th place and try to increase both directions of testing so I'm testing it against 14th-46th ranked characters, etc. I am testing each character with a wider net, from weak to strong.

A guy in 30th place has a higher and higher chance of beating a person ranked lower and lower than it, but there’s still a chance, say, the 40th place guy always beats the 30th place guy but loses to everybody else, due to the way the combinations of coding interact. In the roster-picture method, this is not considered. In the rating method, it is very important.

The Excel crosstable doesn’t include information about B vs A since A vs B is already noted, and the exact reverse would be a mirror of the data in the cell across the middle black line, only multiplied by -1. Thanks to the work of Jesse Gunderson, I have a script that can take the data Excel outputs in cvs into a PGN format which Ordo can read. It took a lot of work together, but we managed to get it working – and the procedure includes running Linux in Virtualbox to run the bash file which can convert the files. If I had to convert the data manually, it would’ve taken far longer and been far more prone to errors.

I managed to alter Jesse's script to read losses in addition to wins and draws. This is a time-saving measure. As I mentioned, A vs B with A winning would mean a "1" is recorded. Therefore by simple logic, B vs A means "-1". But to fill in those empty squares in my crosstable, which would contain no new data, I'd have to transpose 150 lines in Excel.

I altered the script and uploaded it to Termbin via the cat command and just changed the command I inputed into the console to use the new Termbin link. (Termbin is a site much like Pastebin, but pulling code directly off Pastebin can be problematic.) I'm not a coder, so this process took a long time.


Virtualbox running xubuntu, which in turn is running Jesse's script. 

Quick question to Kai Laskos, a statistics buff in TCEC chat, showed that BayesElo as probably the best software to use to calculate elo of the characters given that the sample size is only 1. (Even in the latter half of the chart where I used the newest method, as far as the PGN is concerned, there is a sample size of one. If I got 85-3 score, I input “1”. Remember, the first half of the chart was already in 1, 0, -1 format. I did take pictures of the scores to document however. And dear god, it sucks when I take a picture while a character is performing a super which covers up the score. If I exited the pairing already, then the entire A vs B and B vs A need to be reset, because if I include more B vs A results than A vs B, results will be skewed. Accidentally saving a picture over another due to not wanting to restart paint is a bummer too.) The problem is that the output of Jesse’s program can only be read by Ordo. Ordo is a great piece of software, but it was freaking out about perfect winners and losers. (Even if BayesElo didn’t freak out over that, it would’ve gave me crap results anyways.) In both programs, the white advantage needs to be set to 0 to prevent funkiness in the data.





















Here is what picture editing to combine the results of A vs B and B vs A looks like. This is to document the scores, so that I may build on top of them in the future for larger sample sizes, or reference them to make sure I logged the results correcting in the Excel sheet. Later on I changed the view of that folder to detailed instead of icons, and that sped up lookup of existing pictures.


If a character hasn’t lost to anybody and has only won games, then there’s no way to really simulate the rating of a character. The same goes for perfect losers. Are you 50elo above the guy in second place or 500 or 5000? The data won’t fit well and the program chugs along, even when forced to ignore warnings with the –G switch. The –g switch on the other hand, showed all the problematic characters with data problems. The solution is as follows: There are two types of perfect winners. The first type are winners that are not in first place. The solution is to make it face off against the guy in first place. Boom, now they’ve lost a game. (Casting a wider net on both sides instead of simply doing such an extreme pairing might yield better results I reckon’, at the cost of using up more of my time.) For the person in first place, what I do is I fake a result where the person in first place loses. And no matter the final ratings shown, that person goes in first place. Of course… having a loss there where there shouldn’t be affects the rating of the character, which in terms affects the ratings of characters that have faced off against that character, etc. However, I don’t think the confounding factor here is excessive. I can adjust the final rankings based upon the distortions I see coming.



























Here is Ordo (right) spitting out errors, and the perfect winners/losers report on the left.

---
Some questions were asked that are simply due to lack of understanding of Mugen. For Mugen I want a larger variety of characters. AI skill levels vary all in the roster. It makes no sense to trash a character simply because it’s not the strongest. Otherwise, I just need 1 spot in my roster, not 150. I decide which characters to keep – and some glitch characters might bring value which offsets the trouble they cause. Glitches aren’t black or white – they vary from the aesthetically unpleasing to totally game breaking ones.


Asking for help is easy to do, but getting a response is very tough. I might want to ask in a chess forum because the testing is similar to chess and there are some statisticians in the forum. I could also ask for help in a Mugen forum for obvious reasons. If I ask on a chess forum, people have no idea what Mugen is and don’t want to get involved. If I ask on a Mugen forum, the people there don’t understand why the hell I’d ever want to do what I want to do and stay away. In short, unless there’s a Mugen+Chess&Chill forum I’m now aware of, none of these places can be of help. I did search up match statistics in the Chess Programming Wiki, but that site is very hard to understand. And despite my best efforts are using the formulas, I did not know whem and how to implement them. It took Jesse to write the sorting file, and some chatting with others in TCEC chat for ideas to bounce around.
---

Anyways, time to show the results and conclude!

After some testing to make sure the results were accurate, the output file was hosted on Mega and downloaded from Mega outside of the virtual machine. It took some modifications for Ordo to accept the data, but all in all it went pretty smoothly. I ran the -w 0 switch to tell Ordo to ignore white advantage. (Ordo is a chess rating calculation program, and in chess playing as white is an advantage that needs to be accounted for in the ratings.) Draw percentage didn't affect the ratings, so I left that alone. Since there were only one game for each pairing as far as Ordo is concerned, a higher simulation count won't do much. I weighted God of Wind as #1 and at 0 elo. Then I took the output of Ordo and matched the roster for Mugen with that.




Looking at the names, it looks like I need to fix some of the names so that they line up with what's displaying in the game. Also, I will add more characters to the roster, and cast a wider and wider net for the characters I think need it. As you can see below, my Excel sheet isn't a perfect triangle because some characters needed more testing and some needed less.



Before and after pictures of the roster.



Almost no character was left untouched. The guys at the very end of the list didn't change though, because I've yet to decide whether I want those guys on my roster or not.


Games        : 2682 (finished)

White Wins   : 2031 (75.7 %)
Black Wins   : 572 (21.3 %)
Draws        : 79 (2.9 %)
Unfinished   : 0

White Score  : 77.2 %
Black Score  : 22.8 %

You can see that "white" wins more often than black. What that really means is that Player 1 wins more often than Player 2. Note that this is NOT related to the Player 1 advantage in Mugen. That's because the results are input into Excel after I have taken into account A vs B and B vs A to sidestep the problem. What white winning more often means is that my old roster that was in semi-correct-order had it so that a character who is higher ranked had a 76% chance of beating a character that is ranked lower than it. (Some caveats, but let's not over-complicate things here.)

The final step is to update the Excel spreadsheet/cross-table, to update its rankings from the Ordo data. Row 2 should have the character that's ranked #1, row 3 for #2, etc. I thought about the problem for several hours, but there was no practical way to update the spreadsheet. Intuitively I just want to get in there and start cutting and pasting to somehow get it to work. The problem is that "somehow" doesn't cut it. In the end I found a way to accomplish my goal.

I ran SCID (an old and ugly as balls chess GUI) and loaded the pgn file exported by Jesse's script. Then, I edit the ratings of the engines for SCID such that when I sort the crosstable by ratings, the order will be the same order as the ratings from Ordo. The program doesn't allow for ratings over 4000 or below zero, so what I did was set God of Wind (#1 ranked) as 4000 elo, 2nd place as 3990 elo, 3rd place as 3980 elo, etc. The reason why I put a 10 elo gap is in case I ever have to put a new character in between those characters, so I wouldn't have to manually bump the rest of the 100+ characters down one spot.


 Before and after pictures of the Excel chart:


And that's a wrap!
I've successfully dealt with many obstacles to get my Mugen testing up and running!

Friday, November 6, 2015

Ruminations of an INTJ (Pt. 1?)

This is the last time I'm ever going to bring this up on the blog, ever again. If you don't like the current topic, please come back next time. If the post is too long but you still enjoy the content, please read it in chunks. Thank you.

---

In the blog posts titled in the way this post is, I will talk about my life and the thoughts I've obtained from reflection.

My memory is bad. I've forgotten many of the highs I've had in the past. I've only written down my thoughts for a brief period of time. When I go back to read what I wrote, I was surprised at who derpy I was when I was young, when I first got my email account. In middle school, where all I was thinking about was getting through school without falling on my face and playing Runescape when I got home. Or towards the end of high school, where I became obsessed with a girl. I got back and I read what limited things I wrote, and I get surprised at the emotion in which I expressed my thoughts in the past. Sometimes I wish I could visit my past, pensieve-style. Ok, maybe you've never seen Harry Potter. Pensieve lets the user see experiences they've had in their past. I could see a younger version of myself do the things I've done in the past.


Hmm.

I dislike having to write my thoughts when it comes to simply recording how I am feeling and what I've been up to. If I don't record in detail, I miss the entire point of the enterprise. On the other hand, it's very important for me, so that I remember where I've come from. Still don't know where I'm going though. I guess I can take heart in the fact that the Eric of today is better than the Eric of the past. I think.

Without a clear, realistic, and useful life goal in sight, I guess I am just wandering now. I call it drifting... It's not terrible, I'm not suffering terribly, but I'm not great either. I'm just letting time pass by. Reminds me of a quote I once found on Reddit:


Years ago, my group of friends was pretty darn large. One day, one of my friends did something I thought was unforgivable... to another friend of mine, Being the young (heh), brash, fiery person I became in the short time I left Runescape, I left him and all the friends that didn't agree with me that what he did was out of line and unacceptable. And so, I left almost all of them. Then we hit the end of high school. Is college really any better than high school? Things were good back then. Now... it's all different. Funny... they call it "community college", where I go to. Community college quickly turns into loner college because everybody has different classes and nobody lives together. What was left of my group of friends scattered as we went to different schools. A friend isolated herself to focus her life to her career.

I just go to class, finish, go home. I could go entire months without having a conversation verbally with anybody.

Another person took offense at my fiery rantings and felt I was too stubborn. She doesn't understand what it's like to come out of an entire life of Runescape and then look at the world for basically the first time. The ideas of the New Atheists were hot, freshly struck into my mind. I spoke with passion, but where I was wrong, I was wrong because nobody had yet challenged my ideas with any level of competence. She was one of the people I held in high enough regard to do just that.

Passion doesn't mean you're stubborn forever and ever, especially when you just formed an opinion about many issues. My ideas are subjected to change when new information comes in.

Looking back, there were some loose ends I never bothered to take care of... at least not to my satisfaction, anyways. On the other hand, popping out of the blue to somebody else's life to message them with a long explanation would seem very out of place. I bet 99% of people just move on, anyways. They don't care for an explanation.

Of my two friends, one of them seems to be even more reclusive than I am, and now lives too far away for me to reach conveniently. A lot of friendships were forged due to a common interest, and for me, that common interest was whatever video game I was playing at the time. When we all leave a game, there's really not as much to talk about anymore, despite how much we may have enjoyed each other's company in the past.

It's really sad. I've met some amazing people. Some of those people I would not have ever approached in real life had I not known them beforehand, simply because I figured they weren't my type. And again: This is why documentation is so important. I forget so many things. When I am by myself, I am OK. But with some people, in an effort to be fun to be around, I come up with funny jokes or ideas which I wouldn't if I were on my own. I can't let my INTJ personality as described online dictate what I must feel about social contact. I don't need oodles of it, but I'd like some with some amazing people.

And those amazing people who I've met online scatter when we quit a game. And it's never the same. I see it over and over again. I really don't want you to think that therefore, all the relationships with people I've built in the past while playing a video-game are not as strong as real-life relationships.

Sometimes I listen to a track and I am reminded of whatever life was like when I first discovered the song (since I would replay the song far more when I first discovered it, thus associating the song to whatever I was experiencing at that time period).

I still remember, in middle school, when somebody in a video game managed to get my self-esteem up. Things were different back then. I appreciate what she's done for me. And then, just as quickly as they may come into my life, they are gone in the next moment, and I never got to say goodbye. I hope she's doing well, wherever she is today. Maybe she's since long forgotten who I am. Maybe a "small" act of kindness as perceived by the giver is like giving the entire moon away to the recipient. Maybe I'm the only person that ever cared.
...


I want to be careful. I don't want to be that guy, which, all he does is think about the past and how great things once were, bitter, sitting in a corner, muttering to himself. Perhaps one can be too busy looking at the past to forge new, even more awesome memories in the future.



Video games were a huge part of my life. It was my life. Maybe the older generations don't understand. But it's evident that I'm not the only person that shares this viewpoint. When I go on Youtube and look up soundtracks from Runescape or Maplestory or Final Fantasy, I see people nostalgic, sharing stories back when they were newbies, etc.  The way adults look back into the past with rose-tinted glasses, jabbering on about the 'good old days'? Well, these were my good old days. And they were indeed good. John Lennon I believe said this: Time you enjoy wasting was not wasted.



What will I think of my current state in the future when I look back at this post? Anyways. As usual, comment if you want to voice your thoughts, questions, or opinions about the current blog post. With the advent of the repository, I can afford to write less to-the-point debate/idea pieces. But if that is what the readers prefer, that's not a problem either. Absent of responses, I'll continue to write whatever I feel like, with or without any readers. I don't know why anybody would care to read about my past, but then again, I don't pretend to be able to understand the motivations of whoever decide to read my blog. Life's too short. I try to prevent oversharing, but it might not be such a good idea to keep it all in, all the time. And if I have regrets later, oh well. I've made worse mistakes in the past and I've recovered from those.

Ramblings of a privileged man who's not joyful and out accomplishing great things! Who could ask for more?!




Monday, November 2, 2015

Celapaleis (Reprise)

Hello,

Today I want to talk about 'Celapaleis Reprise'. What is Celapaleis Reprise, why did I pick the parts I did, and how do I feel about the overclocking guides I wrote?

Reprise means 'second movement', a second playing of a similar theme from earlier on. It shouldn't come as a surprise that Celapaleis Reprise is the successor to Celapaleis. That brings up the question, what the hell is a 'Celapaleis'? The story is not nearly as interesting as I am leading you on. It's the name of a city in the video game, 'The Last Remnant', a JRPG by Square Enix (which you may know for their flagship franchise, 'Final Fantasy'). It is pronounced Sell-luh-puh-lay. I've used it as my screen name for a few games, and over time people have found interesting ways to mispronounce it, from the hilarious to the tragic. My favorites mispronunciations include 'Sell-a-see-saw' and 'Sellapotatosalad'.

Celapaleis Reprise is my third computer and the first computer I assembled from the ground up by myself. Originally I wanted to play some games, so I got 'Wizzie Machine' in 2008. It had the superb Q6600 and two 8800gt 512mb cards. 2gb DDR3 ram, but a crappy motherboard made overclocking very hard. Then in 2013 I transitioned to 'Celapaleis', a 4670k build with the 7970ghz edition card, along with 4gb of DDR3 ram. Now in 2015, 'Celapaleis Reprise' is a 6600k build with GTX 980ti.

Wizzie Machine was prebuilt by Cyberpower. Celapaleis was built with friends. Only Celapaleis Reprise is a true solo effort.










Now I will talk about my experiences with my guides.

When I wrote my Haswell Overclocking Guide, I have never overclocked prior to that (apart from dragging a slider in Windows), and there I was with Haswell... I had a lead with the ring bus, I pursued it, I tested the crap out of it instead of speculating and guessing what one should do with it, and I was the person that brought the idea that ring bus overclocking was a needless impediment to core overclocking to the mass audience. With over 18,000 replies, it is the largest Haswell overclocking guide on the internet. I even have more views on my thread than views Linus has on his video guide, and his channel has over a million suscribers. I started out with zero. When you Google 'Haswell overclocking guide', you see my name in the first result. You see it in the Overclocking subreddit. At the time of writing, googling 'overclocking guide' shows my two guides in 5th and 6th result. (This is tribute to Overclock.net's nice SEO, however.)

I am proud of the work I did. I am glad I could help people. It's always nice to see your work pay off. I know that in many ways, what I have done with my guides really aren't that special. In terms of content, I believe my guide is good - but yes, I am biased, but I also had the time and willpower to test things to the end - something most people do not have. I assembled nice graphs and I maintained a chart of overclocking settings.

And so, I helped bust the myth about the 1:1 cache ratio and Prime 'not being certified for Haswell'. To this day, Logan from Teksyndicate refuses to flat out acknowledge his mistakes regarding these two issues.

I skipped DC and with Skylake I wanted a repeat, so I wrote a new guide for Skylake. I've tried to make the Skylake guide better than the Haswell guide. I did do things like power draw testing, and some testing for time-to-crash for stress tests. This testing took far longer than I anticipated, and I got burnt out after an entire week of testing my computer instead of actually using it. While it was busy running tests though, I did read countless random Wikipedia articles and learned a few random things.

I still do charting of overclocking settings, but not much more than that. The guide will do what the guide will do. It still ranks #1 for Skylake overclocking. Most people seem happy with it.

Had you told me that I would make the most popular Haswell overclocking guide ever, with over 18,000 replies, before I bought my Haswell chip, I would have called you crazy. But one thing led to another and here I am. I sound pretty blase about this, because I sorta am at this point. After a while, I was focused on criticisms I've read about my guide. Dealt with some trolls, some idiots, and idiotic trolls. Charted people's overclock, day after day. There were quite a few compliments, and I do appreciate them. Quite a few rep points. But after a while, I'm always just focused on the negative: The burden of making sure my advice is accurate. It's not a good thing to make a thread, and then have some guy come in and be the overclocking expert. On some level it does hurt my ego a bit, but on the other hand, if I'm going to write a guide, it should be because I feel I can do a very good job - and if somebody can waltz in and know more than I do, then something is very wrong. If other people can do a better job than I can, they should be the ones writing the guide.

A guide with a chart is a commitment. Over time I got used to getting compliments. Getting compliments is the new normal, and not getting it is abnormal. It's not good. I guess psychologically speaking, this whole affair has had an interesting effect.

================================================

The next section is very technical for some people, so feel free to skip it.

The parts:
-The CPU: The CPU is really the heart of the computer for me. While many games need much more graphics horsepower than CPU horsepower, the games I play tend to require more CPU power, and in a more specific fashion than just that: I need more single-threaded performance. It makes perfect sense... A game that needs more CPU power needs more because its coding doesn't allow it to use all the cores of a modern-day processor. This means I can't grab an 8-core and call it a day. What does this mean? This means overclocking.

With the last processor, I put the voltage too high for that last 100mhz and I subjected it to too much chess workloads, causing the chip to degrade. It was mostly held at bay by going down to 4.4ghz, a 200mhz drop.

Originally I planned to go with the 6700k but the gains are less than it appears. While the 6700k has more cache and hyperthreading and higher clock speeds, once overclocked the clock speed disparity is totally gone. Hyperthreading is for people who need more cores, which I do not, and hyperthreading with chess is still a major point of contention. The extra cache is immaterial. On the other hand, the supply of Skylake chips were so scarce, and while randomly refreshing the page at SiliconLottery.com at 3 in the morning, I found a chip that can go to 4.8ghz, a $300 4.8ghz 6600k? With the supplies as they were, $300 wouldn't be out of the ordinary for a normal chip. I grabbed it without tax and took the delidding service to get lower temperatures. It's a $50 service, but for the insurance in case something goes wrong and the resealing of the IHS to increase the resale value, I thought it was a bargain.

In the end I got it to ~4.84ghz.

Motherboard:
I wasn't digging the race car look of some of the Gigabyte motherboards. The use of Killer NIC was a turnoff for both Gigabyte and MSI boards. I don't want to have to deal with Killer stuff. Intel NICs are known to be rock solid. I decided to try an ROG board, and with a ram + motherboard deal between the ROG Hero and a ram package I wanted to get anyways, the deal was done. The plastic on the board was removed.

Ram:
DDR4 3000 15-15-15-35. More or less equivalent to DDR4 3200 16-16-16-35. I'll just stick with the lower latencies even though the 3200 kit was black. The red of the 3000 kit worked with the ROG board, but I wanted more black. It can be hard to lower that CAS by even 1. My sticks went to 3050 15-15-15-35 or so. Blegh. DDR4's not really much better than DDR3, even in terms of benchmarks, both in terms of relative price points and absolute best DDR3 kits vs absolute best DDR4 kits. Later on I realized going with DDR4 was the right choice. The DDR3L standard that Skylake officially supported is a low voltage version of DDR3. I thought it meant "low profile". The higher voltage DDR3 requires is detrimental to the CPU long term.

Drive:
The Samsung 850 Pro 256gb was bought because I wanted more space for 6man EGTB for chess. That extra room is great for putting more games, like GTA V and the like. The drive should be able to tolerate an insane amount of writes, so I can write in a carefree manner. It was on sale during Black Friday, but I jumped at the drive a few days prior, thinking the prices wouldn't go any lower. It did, and stayed that way ever since. Oh well. This drive is named 'Celapaleis Reprise' for obvious reasons.

GPU:
The GTX980 ti wasn't my first move. I went to the GTX 980. That was a very power efficient, cool, and quiet card. The 7970ghz had only 3gb of vram, causing me to crash in Skyrim. 980 was the difference between crash and pass at 4gb vram. The 980ti with 6gb of vram gave me a lot of headroom for the future, for games like Fallout 4. It's also over twice as fast as the 7970ghz. The heat was serious though.

GPU Cooling Solution:
I replaced the stock cooler with G45 bracket + x61 280mm AIO cooler, push pull with NZXT fans. This dropped temperatures by 30C at least. Managed to get 1500/8408 out of the GPU.

CPU Cooling Solution:
Reused the D14. Using a new x61 would complicate matters. For example, where am I going to mount the thing? I guess I could mount it up top. However, there's always the possibility of yet more pump whine and I don't want to risk it yet. I can decide on water cooling for the next build.

Case:
While I had a huge boner for the NZXT Phantom Full Tower's airflow and its dust filters, over time I found the traditional full tower form factor to just suck for air flow. For example, the intake fan has to pass through the drive cage. That makes no sense at all. With the Corsair 540 Air, the air is going in, hitting what it needs to hit, and immediately exiting. I highly recommend this case for airflow reasons if you are not a heavy watercooler.

The dual compartment design is smart. I can hide my PSU, SSDs, and a mountain of cables behind it. I also placed a fan controller in the back compartment. Maybe the hard drive can go there one day, that would be my suggestion to Corsair. Oh, and more dust filter options, plus compatibility for dust filters and push/pull out front.

Audio:
I really can't be bothered to go into detail here. I went with the Sennheiser HD800, x2 Rokit 6 g2 for speakers, and Odac/O2 for the dac and amp.

Keyboard:
Due to delays, the Kmac2 upgrade will be a part of the next build.

Mouse:
Reusing Razer Abyssus.

Backup Drive:
Phoenix Down is a 4gb WD external drive that is USB 3 compatible.

===============================

https://www.youtube.com/watch?v=u9xmgbdJGpA

Monday, October 5, 2015

Parallel Universes?!

I was listening to another Sam Harris podcast with some scientist from MIT where they were talking about parallel universes and the ways we could arrive at that idea. Here are two ideas:

-The "universe" as far as scientists are concerned, is really just the visible universe - the area of space we can observe since light has had time to reach us. The colloquial meaning of "universe" is just "everything", and by definition having more than one universe wouldn't make sense.

1. So imagine if the area outside of our universe is far larger than we anticipated, perhaps infinite. If there is matter to match, then that means by sheer chance there will eventually be a planet just like ours, with atoms/etc arranged in such a way that the planet is almost identical to ours. With infinite space, there would be infinite copies of everything and anything that can happen will happen, and happen infinite times.

2. If space has different "phases", then maybe we are just a goldfish that swims in water, never to realize there is ice and steam. In these different areas of space, what we thought were constants and laws of the universe would be different. There could be many solutions to a complicated equation. Maybe we could have thought the length of a year and day were laws and constants, but we know today that's ridiculous... The length of a day and year is simply that way due to chance, and there are many other planets in the universe where the day and year are different. So maybe in these other places with different space, what we thought were laws are not, and there could be say, 10 different type of quarks instead of the usual number.

So then another point was discussed, of parsimony. It would seem that having these long explanations filled with infinite possibilities/etc would be the opposite of parsimony. The argument would be that the equation could be parsimonious... For example, the equation to figure out the flow of water at Niagara Falls can be written on a Tshirt, but figuring out the answer is very difficult.

And finally, something about the 'we live in a simulation' argument... Since advanced beings can make simulations, and if these beings choose to do so, the number of simulations far outnumber the one reality, and due to probability, we are probably in a simulation. Of course, then the question is: What about these advanced beings who created the simulation with us in it? Wouldn't the very same argument apply to them as well?

Some fun things to think about tonight.

Original Podcast:
http://www.samharris.org/blog/item/the-multiverse-you-you-you-you