Search

Friday, December 28, 2012

Day 140: Back!

Well, I am back after some days with conjunctivictis (both vacterial and viral) :( I am not 100% fine, but will try to continue with all the refactoring.

Thursday, December 20, 2012

Day 132: More refactoring


One more thing that I won't need anymore: The tryToKill method called in the main loop. It will be easier for me if in the setMove method I kill the stones.

This will make me do more refactoring: Suicidal rule will change to.

Wednesday, December 19, 2012

Day 131: 0.01G

Ok, this is changing fast. I am refactoring a lot. So, this is what I think now:


  • The array with the game moves should be in a new class Game. It will be easier to make reference to the game moves if all the methods that manipulate the game array are there.
  • I Created a new package for rules. Every rule will have a class, it is for the future. Some things should change when the engine finds a ko or a suicide.
  • Some old code that I commented is now deleted.
I found console class (Good bye console!!!!!)

Tuesday, December 18, 2012

Day 130: At least it worked

Well, I was having lots of problems with KGS connection, but as I suspected, the problem was not with KGS, it was with me. Every command that don't need a return at least should have an empty string return. Komi command didn't return it so all commands coming from behind were queued.




Solved that, but saw that KO rule was working bad, so I will have to redesing it. I have an idea. I will create a new class for KO, because ko rule will not only need to prevent illegal moves, but start some things in the future.

Monday, December 17, 2012

Day 129: Made me this


Just for fun, this days should come home this tshirt :)

I will feel better while seeing my program being destroyed.

Day 129: Problems with KGS

Ok, the engine works playing using goGui, but not in KGS, I will try to write what happens:


  • I connect with my user account Draculinio
  • Connect Evil Tesuji using his account on KGS.
  • Start a game.
  • KGSGTP says something about opponen left the game and returns
  • From what I see in my log, some commands are sent, like komi.
  • No genmove or play commands sent :(
So, here are my problems... :(

Sunday, December 16, 2012

Day 128: The failure after 15D

Well, some good things and some bad things.

Connection worked!
So, I saw Evil Tesuji there:


And almost played:


And then, my little daughter started to cry, and couldn't play the game, then, we went to a birthday party :( But, first thing done. Now, let's try again.


Thursday, December 13, 2012

Day 125: Starting with 0.01F

Some things that I am seeing:


  • There were some variables from the pre-gtp era like a hardcoded humanColor and engineColor. With gtp it is not needed, The engine should know what to do in a given circumstance with any color.
  • Engine should have an array with the moves of the game, I think this will give me more things to analize.
Getting the engine play better: 

  • Will start to try to make the computer see basic eyespace. 
  • Some things about corners.
  • More about jumps. ->Will try jumps to the center.

Wednesday, December 12, 2012

Day 124: Readers are always right part II



A reader sent me a suggestion about the last "Readers are always right" post. The variable play is not needed, it only needs what I sent to that variable. So, now it is corrected.

Thanks Sergio!

If you still think, "why the picture?" Sergio is a big fan of the band.

Day 124: Games with 0.01E

Well, Evil Tesuji played a game without errors (heavy testing needed, I KNOW, it will crash eventually). A 9x9 game (I will not let it play 19x19 for some time). Playing bad on porpouse Evil Tesuji was destroyed. But it is a start, I know some day it will do it better.

(;FF[4]CA[UTF-8]AP[GoGui:1.4.5]SZ[9] KM[6.5]PW[Evil Tesuji]DT[2012-12-12]RE[B+69.5] ;B[gc];W[dc];B[ff];W[gf];B[gg];W[dg];B[cg];W[ce];B[dh];W[cd] ;B[eg];W[fd];B[gd];W[ge];B[hg];W[df];B[fe];W[bc];B[fc];W[ed] ;B[ec];W[ac];B[bf];W[ig];B[ih];W[hh];B[if];W[hf];B[he];W[ie] ;B[id];W[hf];B[eb];W[ge];B[be];W[bg];B[cf];W[gh];B[fh];W[ag] ;B[de];W[ee];B[ef];W[dd];B[bd];W[hc];B[ca];W[ic];B[cb];W[ch] ;B[bh];W[ia];B[];W[])

White is Evil Tesuji. I know, it plays, horrible, but I know it will be better.

Tuesday, December 11, 2012

Day 123: Passing working

Well, I just solved the passing. Still waits for the other player to pass so it will pass. Not a big thing but, is better than nothing. I still don't know how to force a ko or a suicide shape to see if it works.

So, let's continue with the development. One step forward, one step back... the hard truth...

Monday, December 10, 2012

Day 122: This is getting hard

I think I solved some issues, but to get a stable version is another thing. Sometimes ko method is not working at all, I will test it again tonight and make loads of changes. So, the debut will be with 0.01E for now. Suicide seems to be working.

This IS hard.

Saturday, December 8, 2012

Day 120: The ship is sinking


This projet is not easy, it never was, but sometimes it gets frustrating. The BIG mistake I made all this time was to test it on 19x19, just to see some moves.

I tested yesterday on 9x9 and found LOTS of problems: Hangs, illegal moves (ko, suicide), problems when the player passes and moves in the border. Most of them are being saved, but it is taking me a lot of work to solve all of this. Well, back to work!

Friday, December 7, 2012

Day 119: Testing 0.01D

This is a first test of some moves against 0.01D:

(;FF[4]CA[UTF-8]AP[GoGui:1.4.5] KM[6.5]PW[Evil Tesuji]DT[2012-12-07] ;B[dd];W[pp];B[pd];W[dq];B[co];W[pq];B[jc];W[cc];B[cd];W[cp] ;B[do];W[eq];B[ck];W[qp];B[qj];W[nq];B[jj];W[kq];B[hq];W[po] ;B[ch];W[qc];B[pc];W[gq];B[gr];W[lc])

Hard to say if better or not, by chance it made some interesting moves, but... well, who knows...

Day 119: Preparing Evil Tesuji for debut

Well, right now I am reading how to connect my engine to KGS, I am trying very hard to run first tests without me playing by Dec. 15th.

For now I think that the version 0.01D (the actual) will be playing, I will continue to develop version 0.01E and if it is stable by then, then let it play :)

There is a tutorial on how to set up bots in kgsgtp file, and there is another one here, so, I if you are often on KGS maybe in next days you will see Evil Tesuji account connecting and desconecting all the time :).

I know Evil Tesuji will be destroyed in every single match. But I am really wanting to see it play, it is just a starting point for this.

Thursday, December 6, 2012

Day 118: Going further with last post

Thinking about last post I saw that lot of things can be redone using new methods. In-which-line-is-the-move  guesser can be done. And I will use it for jumping later.

Tuesday, December 4, 2012

Day 117: Readers always are right

On my day 99 post, a reader, Steve, pointed at something that is right. I am using a lot up, down, left and right, so, it is better to create methods for that. I will create them in board class.

public int up(int move){ int play; play=this.getMove(move-this.getBoardSize()+1); return play; } public int down(int move){ int play; play=this.getMove(move+this.getBoardSize()+1); return play; } public int left(int move){ int play; play=this.getMove(move-1); return play; } public int right(int move){ int play; play=this.getMove(move+1); return play; }