Ideas for a simple Go programme

All non-Go discussions should go here.
Post Reply
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Ideas for a simple Go programme

Post by Stefany93 »

Howdy,

I am currently pretty advanced with the programming language of Perl and I am looking for a project, for free of course, I will post the program in GitHub.

Any ideas for a simple program to be made ? Maybe something needed with .sgf files or anything. Because I want to train my Perl skills and contribute to the wonderful Go community as well :))

Many Thanks!
macelee
Lives in sente
Posts: 928
Joined: Mon Dec 31, 2012 1:46 pm
Rank: 5 dan
GD Posts: 0
KGS: macelee
Location: UK
Has thanked: 72 times
Been thanked: 480 times
Contact:

Re: Ideas for a simple Go programme

Post by macelee »

I have an idea on a small Go-related project.

I want to keep track of games played at Kansai Kiin. Currently, they present game results at http://kansaikiin.jp/subpage/prokisen_a.php. They only keep three week's data and rotate three pages to keep record of ongoing games: prokisen_b.php, prokisen_a.php, and prokisen_c.php. Once new results are available old ones get overwritten. I always want to write a script to automatically check these pages, find and save newly available data so that historical results can be saved for future reference.

This is not too difficult but not too easy to do either with a scripting language.
Oberon
Beginner
Posts: 6
Joined: Tue Oct 22, 2013 2:04 pm
Rank: KGS 5 kyu
GD Posts: 0
KGS: Oberon
Been thanked: 2 times

Re: Ideas for a simple Go programme

Post by Oberon »

Stefany93 wrote:Howdy,

I am currently pretty advanced with the programming language of Perl and I am looking for a project, for free of course, I will post the program in GitHub.

Any ideas for a simple program to be made ? Maybe something needed with .sgf files or anything. Because I want to train my Perl skills and contribute to the wonderful Go community as well :))

Many Thanks!


Why not a "guess next move" program that you could use to replay .sgf pro games, that would record statistics on your success rate...
jeromie
Lives in sente
Posts: 902
Joined: Fri Jan 31, 2014 7:12 pm
Rank: AGA 3k
GD Posts: 0
Universal go server handle: jeromie
Location: Fort Collins, CO
Has thanked: 319 times
Been thanked: 287 times

Re: Ideas for a simple Go programme

Post by jeromie »

My other idea for a simple program (that I've thought about making) would be a "counting practice" application - display a diagram of a finished game with a known result, and use a timer to see how fast the user can count the score. You could also make it back the game up N moves and see if the user can still figure out the final score. It's easy to get lazy about counting when playing primarily online, and I take a lot of silly risks in the endgame just because I'm not confident about where the current score stands when the game is close.
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Re: Ideas for a simple Go programme

Post by Stefany93 »

macelee wrote:I have an idea on a small Go-related project.

I want to keep track of games played at Kansai Kiin. Currently, they present game results at http://kansaikiin.jp/subpage/prokisen_a.php. They only keep three week's data and rotate three pages to keep record of ongoing games: prokisen_b.php, prokisen_a.php, and prokisen_c.php. Once new results are available old ones get overwritten. I always want to write a script to automatically check these pages, find and save newly available data so that historical results can be saved for future reference.

This is not too difficult but not too easy to do either with a scripting language.


This is a good idea - could update my skills with Perl scraping.

Do you think the website owners might get mad if I upload my program to GitHub or share it here? Since we shall be scraping data, however they put that data there themselves, so... :study:
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Re: Ideas for a simple Go programme

Post by Stefany93 »

Oberon wrote:
Stefany93 wrote:Howdy,

I am currently pretty advanced with the programming language of Perl and I am looking for a project, for free of course, I will post the program in GitHub.

Any ideas for a simple program to be made ? Maybe something needed with .sgf files or anything. Because I want to train my Perl skills and contribute to the wonderful Go community as well :))

Many Thanks!


Why not a "guess next move" program that you could use to replay .sgf pro games, that would record statistics on your success rate...


Could be, but too complicated for Perl, it is not C++ :D

I am looking for programs that would be run from the CMD/Shell
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Re: Ideas for a simple Go programme

Post by Stefany93 »

jeromie wrote:My other idea for a simple program (that I've thought about making) would be a "counting practice" application - display a diagram of a finished game with a known result, and use a timer to see how fast the user can count the score. You could also make it back the game up N moves and see if the user can still figure out the final score. It's easy to get lazy about counting when playing primarily online, and I take a lot of silly risks in the endgame just because I'm not confident about where the current score stands when the game is close.


Not a bad idea, thanks, I will think about it...
macelee
Lives in sente
Posts: 928
Joined: Mon Dec 31, 2012 1:46 pm
Rank: 5 dan
GD Posts: 0
KGS: macelee
Location: UK
Has thanked: 72 times
Been thanked: 480 times
Contact:

Re: Ideas for a simple Go programme

Post by macelee »

Stefany93 wrote:
This is a good idea - could update my skills with Perl scraping.

Do you think the website owners might get mad if I upload my program to GitHub or share it here? Since we shall be scraping data, however they put that data there themselves, so... :study:


That is unlikely. Game results are not sensitive data, and checking the pages a few times a week won't use much bandwidth. So I don't see any problem.
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Re: Ideas for a simple Go programme

Post by Stefany93 »

macelee wrote:
Stefany93 wrote:
This is a good idea - could update my skills with Perl scraping.

Do you think the website owners might get mad if I upload my program to GitHub or share it here? Since we shall be scraping data, however they put that data there themselves, so... :study:


That is unlikely. Game results are not sensitive data, and checking the pages a few times a week won't use much bandwidth. So I don't see any problem.


Very nice, thank you. I might start working on it soon and I will keep you updated.

In the meantime, all ideas are greatly appreciated :bow:
User avatar
anazawa
Dies in gote
Posts: 27
Joined: Fri Jul 05, 2013 2:11 am
GD Posts: 0
Has thanked: 6 times
Been thanked: 7 times
Contact:

Re: Ideas for a simple Go programme

Post by anazawa »

Stefany93 wrote:Howdy,

I am currently pretty advanced with the programming language of Perl and I am looking for a project, for free of course, I will post the program in GitHub.

Any ideas for a simple program to be made ? Maybe something needed with .sgf files or anything. Because I want to train my Perl skills and contribute to the wonderful Go community as well :))

Many Thanks!


Thanks for your comment on "Introducing MetaKGS.org" :)
I introduce some useful modules on CPAN.

Currently two SGF parsers are uploaded on CPAN:

* Games::SGF (object-oriented) provides SGF data with object methods such as #next or #prev
* Games::Go::SGF::Grove (procedural) provides SGF data as raw Perl data structure

The above modules will help you parse SGF files.

Go board modules:

* Games::Goban - simple go board class

While Games::Goban implements #as_text method which converts the board object to a plain string,
it lacks methods that convert the object to graphics files like PNG. I believe you can extend the class to add those methods.
Imager might be helpful to build graphics files.

If you want to write a scraping script, a wrapper around libxml would be helpful:

* Web::Query (object-oriented) provides jQuery-like interface
* Web::Scraper (procedural) a little bit outdated but worth reading the source code

As far as I know, CPAN lacks a SGF player with a go board object which receives SGF data
and implements object methods such as #next_move that updates the board object.
User avatar
Stefany93
Lives with ko
Posts: 248
Joined: Wed Jun 23, 2010 12:39 pm
Rank: KGS 8k
GD Posts: 0
KGS: Azumi93
Online playing schedule: When I am in a mood for Go :D
Location: Arkansas, USA
Has thanked: 193 times
Been thanked: 21 times
Contact:

Re: Ideas for a simple Go programme

Post by Stefany93 »

anazawa wrote:
Stefany93 wrote:Howdy,

I am currently pretty advanced with the programming language of Perl and I am looking for a project, for free of course, I will post the program in GitHub.

Any ideas for a simple program to be made ? Maybe something needed with .sgf files or anything. Because I want to train my Perl skills and contribute to the wonderful Go community as well :))

Many Thanks!


Thanks for your comment on "Introducing MetaKGS.org" :)
I introduce some useful modules on CPAN.

Currently two SGF parsers are uploaded on CPAN:

* Games::SGF (object-oriented) provides SGF data with object methods such as #next or #prev
* Games::Go::SGF::Grove (procedural) provides SGF data as raw Perl data structure

The above modules will help you parse SGF files.

Go board modules:

* Games::Goban - simple go board class

While Games::Goban implements #as_text method which converts the board object to a plain string,
it lacks methods that convert the object to graphics files like PNG. I believe you can extend the class to add those methods.
Imager might be helpful to build graphics files.

If you want to write a scraping script, a wrapper around libxml would be helpful:

* Web::Query (object-oriented) provides jQuery-like interface
* Web::Scraper (procedural) a little bit outdated but worth reading the source code

As far as I know, CPAN lacks a SGF player with a go board object which receives SGF data
and implements object methods such as #next_move that updates the board object.


No worries, and thank you for the useful information. Didn't know there were Go modules on CPAN, LOL !
Post Reply