Posts

How I write a chess engine [Part 1]

Image
    I was interested in chess lately.     Actually I'm not good at playing chess but I'm curious about the way computer solves it and defeats human.     In this series, I will go through 3 most important parts to build a chess engine: Graph algorithm, evaluation function and the last part, chess interface. I will use Go as the implementation since it's fast and easy to write.     This post, I'm going to implement the first part of a chess engine: The algorithm on graph.     Table of contents Graph - how does chess look like in computer memory The minimax algorithm Optimizations Conclusion and references 1. Graph - how does chess look like in computer memory     Computer thinks of chess as states, each state is a board where pieces are placed. Each move changes from one state to another, constructs a graph. From one state, players may have plenty ways to make a move, expands the graph t...

[Note] Things that I'm gonna do in 2018

It's 2018 already! Time to make a plan about what I'm gonna do in this year. 1. Algorithm and data structures - Parallel data structures - Advanced tree data structures - Compression algorithms - and many more, if I have time 2. Programming - Reading more kernel's code and write something useful in C - Programming with Golang - Apply some parallel data structures 3. English and translation Translation is always fun. In 2017, I did a translation "The dandelion girl" (Robert F. Young) from English to Vietnamese. Although it was, not so great but translating it was suprisingly fun. I also got some positive comments from my friends. So in this year, I'm trying to improve my translation skills with 3 or more translations, maybe some short stories or some fanfics. 4. Japanese Time to relearn Japanese and do something, a translation would be great I guess. And? Continue posting stuff to this blog ...

First time doing translation: The dandelion girl [Robert F. Young]

Image
Well, first time doing translation. It was a short story that I really love: "The dandelion girl" from Robert F. Young Many thanks to lv , who helped me to make the translation much better. Here it goes: Original version: Download My translation: Download Copyright disclaimer : This is my own translation, from original version (English) to Vietnamese. I didn't ask for permission to translate this. So nothing is mine but the translation.

How did we bypass Meganet's anti-hotspoting protection

Image
Raspberry Pi, NAT, IP forwarding     Recently, I've bought a Raspberry Pi to craft some stuff, the first thing I've though of is to make a simple wifi hotspot, sharing my internet to my roommates. I found this , which is a very nice tutorial, I set up everything as written in the tutorial and everything should work the way it was supposed to be but there was one thing I couldn't figure out: The internet was inaccessible, whenever I connect to the Raspberry Pi, it redirects me to the login page although I've logged in to Meganet.     Meganet is a company which provides wifi internet solution in campus infrastructures like university and dormitory. They have a database which maintains user info, whenever you connect to Meganet's network, a luxury HTTP login page (shrugs) appears and tells you to fill-in your account to use the internet. But since we can use any wifi-hotspot program to share our internet with only one account (this hurts Meg...