♔♕♖♗♘♙ ChessatmyboarD ♟♞♝♜♛♚

ChessatmyboarD

My Chess Blog
♔♛

Chess programming introduction

Posted on November 15th, 2012 by Richard

Chess programming is a hobby I enjoy.

I have done several code snippets in several programming languages for help with computer chess play.
I do have an ambition one day to have programmed my own chess engine.

So far I have done a java chess engine but that was with the help of ThinkQuest and used sections of premade code. My very first introduction to chess programming was writing Perl scripts to clean and parse pgn files using regexes. I learnt a little bit of Perl programming and of course it is a great language for text & data wrangling & so quite suitable for chess.
I even made a perl script that takes a pgn file and outputs music! Quite amazing what is possible to do in programming.

This week I made the start of a console chess game in C. Getting a good board representation (and with a GUI if you want good graphics) is a basic first stage in chess programming. GUI=Graphical User Interface and is a nice frame to hold the chess game and display nice images like a real chessboard in as opposed to a basic text output at the console (command shell).See screenshot below:

2 player console chess in C

2 player console chess in C

The next obstacle is to get the moves input and output & I struggled with this. It is a good, but for me, a hard learning curve and this was only for a basic console output without AI (AI=Artificial Intelligence)! Topics covered include array handling and string manipulation. Screenshot of part of the code in code editor below:

Code for chessgame in C

Code for chessgame in C

I started then to look at wrapping this all in a Windows GUI with a Win32 project in Visual C++ (MS Visual Studio) but this needs a lot more work. So there is still a lot more to be done with the chess logic and GUI programming. Great fun…..

I have also looked at chess in a web browser with JavaScript and HTML5. Hopefully I will do some posts on this later. The joys of chess are not just limited to playing but for me extend to programming too!

Tags: ,
Posted in Chess Programming1 Comment »

Written by:

♔♛

French defence Advance variation

Posted on October 17th, 2011 by Richard

I like the French defence. It is my favourite defence as Black vs White 1.e4 and as I play 1.e4 as White I often face it as White and am trying to learn & play the French Advance variation as White.

Off the top of my head now I cannot remember a specific French defence game as Black or White as good examples. I will try & look into this as I think it helps understanding of the openings if you can recall specific games. I do know Bobby Fischer played as White vs the Winawer variation several times. For the Black side I recall Botvinnik had some good French defence games & Unzinger specialised in it (Korchnoi must have played it too!-I will investigate!).

Well here is my latest chess video showing a 5min blitz game in the French Advance. I made several mistakes as White in this game & my opponent certainly made mistakes with a massive end blunder to lose the game!

[youtube]http://www.youtube.com/watch?v=fzWXwG-fwwM&feature=channel_video_title[/youtube]

I intend to learn from my mistakes and improve my chess play & rating!!

 

 

Tags: , , ,
Posted in chess games, Chess Openings, My ChessComment on this post »

Written by:

♔♛

BSE Chess Congress 2010

Posted on November 1st, 2010 by Richard

 

Last weekend (30/31 Oct 2010) was the Bury St Edmunds Chess Congress in the

new  Apex function hall. There was a large entry of over 170 chess players.

Chess in the Apex BSE

BSE Chess Congress 2010 in the new Apex building

 I had to take a bye on the 3rd round (went to watch my daughter perform in LMA drama production ‘FAME’ which was very good!).

Anyway I played badly in my 4 matches in the Minor section only acheiving a draw with 3 losses so finishing with 1/5!

This was very disappointing to me. I played several openings:- French Exchange (as black)/Alekhines’s defence (as white)/Bird’s Opening (as black)/Nimzowitch defence (as white) and my favourite Scotch (as white).

There was a joint winner in the Open section-a tie between GM M Turner and GM N Pert

 

 Open Section

 Here is my only half reasonable reult-the draw I made in round2:

Alekhine’s defence-Draw agreed

[pgn height=500 automove=none]

[Event “Bury Chess Congress”]
[Site “BSE Apex”]
[Date “2010.10.30”]
[Round “2”]
[White “Me”]
[Black “NN”]
[Result “1/2-1/2”]

1. e4 Nf6 2. e5 Nd5 3. c4 Nb6 4. Nf3 e6 5. b3 d6 6. Bb2 Nc6 7. Be2 Bd7 8.
d4 Be7 9. Nc3 h6 10. O-O Rf8 11. Qd3 g6 12. Ne4 Nb4 13. Qd2 Bc6 14. Nf6+
Bxf6 15. exf6 Bxf3 16. Bxf3 Nc6 17. Bxc6+ bxc6 18. Qxh6 Qxf6 19. Qd2 Kd7
20. d5 Qf5 21. dxc6+ Ke7 22. Rac1 Qc5 23. Rfd1 Qxc6 24. Rc3 Rfd8 25. Rf3 e5
26. Qg5+ Kf8 27. Rh3 Ke8 28. Rh8+ Kd7 29. Rxd8+ Rxd8 30. f4 Kc8 31. fxe5
Qe8 32. exd6 Rxd6{Draw offered by black & agreed}
1/2-1/2

[/pgn] 

I was very disappointed with my play and results-in all games except round2 draw I blundered away good positions I had achieved. The only thing I can do with this is put it down to experience and try & learn some lessons from it and play better in my next matches! I do need to do 2 specific things:

1. Do not spend too much time on moves and then try to play too quickly to get to the time control.

2. Do not move too quickly and make blunders!

These are almost mutually dependant actions and overall I need to think more carefully about how I play each move and the whole game.

So I still have a lot to learn and a lot to improve to achieve my aim to play good chess and improve my rating!

Tags: , , ,
Posted in chess games, Chess Openings, My ChessComment on this post »

Written by:

♔♛

Thetford RapidPlay 18/09/10

Posted on September 22nd, 2010 by Richard

Thetford RapidPlay chess


Last weekend was the Thetford RapidPlay competition (G30 time control).
This fine local chess competition is run by Thetford Chess Club organised by Kevin Moore and his helpers. It has a continental flavour in that a group of players from Spikenjisse Chess Club in Holland play the tournament and are hosted in the local area.

The tournament was a great success and enjoyable for all chess players even those who were a little disappointed with their results.

I played in the Minor u125 section ending with 4/6. This section was won by Richard Donahue. My son Chris played in the strong Open section and he finished with 3/6 and overall this section was won by Stephen Orton.

Unfortunately although I scored all my games I made some errors in the scoring & did not complete any one scoresheet & I cannot show my games! I must improve at scoring while playing to ensure I do not miss out moves but record all accurately & quickly.

Chris & I had a good time and we hosted Steyn & Jarno who did well too! Thanks Kevin for all your work!

Thetford chess 18/09/10

Thetford RapidPlay Chess 18/09/120

Tags: ,
Posted in My ChessComment on this post »

Written by:

♔♛

GM M Adams wins British Chess Championship

Posted on August 13th, 2010 by Richard

Congratulations to GM Michael Adams on his win in the British Chess Championship.

Also congratulations to IM Jovanka Houska who won the womens title.

Mickey Adams won with a score of 9½/11 and a 2757 performance. Nick Pert finished second on 8 with a 2612 performance whilst Stuart Conquest, Andrew Greet, Jonathan Hawkins, Adam Hunt, Richard Pert & Alexei Slavin all finished equal third on 7½. Congratulations to Adam Hunt who secured his 2nd GM norm with a 2624 performance over eleven rounds

Here is the round 9 game between Adams and Hunt that ended in a draw:

[pgn height=500 initialhalfMove=16 autoplaymode=none]

[Event “97th ch-GBR”]
[Site “Canterbury ENG”]
[Date “2010.08.04”]
[Round “9.1”]
[White “Hunt, Adam C”]
[Black “Adams, Michael”]
[Result “1/2-1/2”]
[ECO “C65”]
[WhiteElo “2408”]
[BlackElo “2706”]
[PlyCount “64”]
[EventDate “2010.??.??”]

1. e4 e5 2. Nf3 Nc6 3. Bb5 Bc5 4. c3 Nf6 5. O-O O-O 6. d4 Bb6 7. Bg5 h6 8. Bh4
d6 9. Qd3 g5 10. Bg3 Nh5 11. Bxc6 bxc6 12. Nbd2 a5 13. dxe5 dxe5 14. Qe2 Ba6
15. c4 f6 16. Rfd1 Qe7 17. Ne1 Ng7 18. Nc2 Ne6 19. Nf1 Qh7 20. b3 Rad8 21. Kh1
h5 22. h4 g4 23. f3 gxf3 24. gxf3 Kh8 25. Nfe3 Nd4 26. Nxd4 Bxd4 27. Rac1 Rg8
28. Bf2 c5 29. Rg1 Bc8 30. Rxg8+ Rxg8 31. Rg1 Be6 32. Rxg8+ Kxg8 1/2-1/2[/pgn]

Tags:
Posted in chess games, Chess Openings, My ChessComment on this post »

Written by:

« Older Entries