Search

Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Thursday, October 4, 2012

Day 57: First video and log

As I promised, here is a video of how is the program working so far.



The program is SLOW, this is because I am logging a lot, it is running on an overcharged computer and is running from a pendrive. So, to save this I should:



  1. Make less logging (just log the same info but writing less).
  2. Sometimes I should run this from a computer that works well, it just plays random moves, it shouldn't take so long to choose a valid move.
  3. Run it from a hard disk XD.
But, right now what bothers me is how to continue.

The log (10 moves... 206kb.), that is something impossible to keep.


Thursday, September 6, 2012

Day 29: Suicidal rule

Until now I was filtering possible moves by two things:


  • Spaces with a 0 (Empty)
  • There is no Ko
But, there are other spaces that could be not allowed to be played, let's see suicidal rule:


In most common ruleset, suicide is forbidden, so for now it will be for my program (maybe some day I will do something for the other rulesets).

So, there is how I will implement it:

  1. The number of liberties of the group if I play this move == 0?
  2. If not, move is allowed
  3. if yes, try to kill groups of the other color.
  4. If kills, move is allowed
  5. if not, this is a suicide move and can't be played.
I just created a method to see if a move is suicide (this is my first aproach, not tested yet):



Maybe tomorrow I will continue coding, or today if I have some time (I wish I can). 

Monday, September 3, 2012

Day 26: Logging


To see if all what I want to control on the engine is working the way I like, I need to log all that it does. This is the first approach to this:

Important: In Windows 7 you need to run GoGui in Administrator Mode.
I made methods to:


  1. Log any String I want.
  2. Log the date and time
  3. Log the board as it is in the moment.

 

I have to make some changes but the basic idea works. Now I can delete console class and replace it with this.