QueenAlice.com


Username:

Password:

Remember me



Forgot Password?
Registration FREE!





Topic: improved ruby code, sorts pgn by occurences of opening sequence
Back to Forum Index
Back to Forums List


Author

Message
jemptymethodUnited States flag
Dec 24 2009 01:59 AM
Instead of pasting the Ruby code in here, here is partial output from my program (the openings that occurred at least twice, in a sample of 25 games)

Feel free to contact me here anybody who wants the source code. Eventually I want to create a "tree" out of the data, where nodes with more than one game can be expanded. And with statistics as to the result with the various openings. Probably my first Ruby on Rails application.

1. e4 has 18 game(s)
1. e4 e5 has 8 game(s)
1. e4 e5 2. Nf3 has 5 game(s)
1. d4 Nf6 has 5 game(s)
1. d4 has 5 game(s)
1. e4 e5 2. Nf3 Nc6 has 5 game(s)
1. e4 c5 has 4 game(s)
1. e4 c5 2. c3 has 4 game(s)
1. d4 Nf6 2. c4 has 2 game(s)
1. e4 e5 2. Nf3 Nc6 3. d4 exd4 has 2 game(s)
1. e4 e5 2. Nf3 Nc6 3. Bc4 has 2 game(s)
1. e4 e5 2. Nf3 Nc6 3. Bc4 Nf6 has 2 game(s)
1. e4 c5 2. c3 d5 3. exd5 has 2 game(s)
1. e4 e5 2. Nf3 Nc6 3. d4 has 2 game(s)
1. d4 Nf6 2. c4 e5 has 2 game(s)
1. e4 c5 2. c3 d5 3. exd5 Qxd5 has 2 game(s)
1. e4 c5 2. c3 d5 has 2 game(s)
1. d4 Nf6 2. c4 e5 3. dxe5 has 2 game(s)

kingdaveUnited States flag
Feb 21 2010 11:28 PM
Have you looked at chessgames.com? It would be nice to be able to view one's own game history like that. As for your program, what exactly is Ruby? (All right, I can use google -it's a programming language.) So what is the motivation to use Ruby rather than, say, java?

whyBishNew Zealand flag
Feb 22 2010 05:36 AM
Ruby is a dynamic language, so it is less verbose (more compact). this makes it easier to write, but (from a business point of view) harder to maintain, and easier for non-skilled developers to make a mess with.

OnceuponEngland flag
Feb 22 2010 05:42 PM
How old is Ruby and what is her marital status?

whyBishNew Zealand flag
Feb 22 2010 06:19 PM
Ruby will turn 17 on 24th of Feb.
Ruby has already given birth to some other languages.
But the good news for you Onceupon is that Ruby is a single pass language.

OnceuponEngland flag
Feb 23 2010 08:40 PM

17


:-P


©2004-2025 Queen Alice Internet Chess Club
All rights reserved.