Jump to content
IGNORED

Chess


Andrew Davie

Recommended Posts

Is a chess rookie allowed to post here?  

 

Really enjoy this and your other projects Mr. @Andrew Davie, you have a gift!  

 

In my test game with the 5ply version, the computer beat me and the game continued, which was interesting.... The game threw me a bone ha...  

 

One of the things I was having difficulty with was the colors for both sides are pretty close, the pawns are sometimes hard to tell apart for me, but I enjoy it nonetheless..

 

Link to comment
Share on other sites

1 hour ago, Gray Defender said:

Is a chess rookie allowed to post here?  

 

Really enjoy this and your other projects Mr. @Andrew Davie, you have a gift!

Seconded!

 

I may not understand half of what you're posting Andrew, but it sure is nice having you developing games for the 2600 again. :) 

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, Gray Defender said:

Is a chess rookie allowed to post here?  

 

Really enjoy this and your other projects Mr. @Andrew Davie, you have a gift!  

 

In my test game with the 5ply version, the computer beat me and the game continued, which was interesting.... The game threw me a bone ha...  

 

One of the things I was having difficulty with was the colors for both sides are pretty close, the pawns are sometimes hard to tell apart for me, but I enjoy it nonetheless..

 

 

TY for your comments. 
You're patient to play the 5ply. I think you're the first to do that.

The computer has no idea of "end of game" yet. It just tries to maximise its score - and that is basically achieved by capturing things, the more "prestigious" the better.

The colours are tricky, and this has been addressed before. Basically the '2600 is only displaying a single colour on any scanline. I form the different colours (blue squares, white pieces, 'black' pieces) by varying three colours on successive lines, and varying on/off pixels at the same time. The 'black' pieces are actually the white piece colours minus one of those three colours. And the blue squares colour is one of those three colours. So it's very tricky to make things look different. I can, however, change the shape of the black/white pawn so it's different, and have experimented with that earlier in this thread. The pieces are only 5 pixels wide, so that puts a severe limitation on their design.

 

Link to comment
Share on other sites

1 hour ago, Karl G said:

@Andrew Davie - I'm just wondering if you are still thinking about eventually using the PlusCart to allow human vs human games over the Internet?

I'm not sure yet I get the feeling I'll be developing this for years.  So... maybe.

I'm half considering using the PlusCart as the basic "board" for a release, so it would be nice to have some support of its features.

 

Link to comment
Share on other sites

39 minutes ago, Andrew Davie said:

The colours are tricky, and this has been addressed before. Basically the '2600 is only displaying a single colour on any scanline. I form the different colours (blue squares, white pieces, 'black' pieces) by varying three colours on successive lines, and varying on/off pixels at the same time. The 'black' pieces are actually the white piece colours minus one of those three colours. And the blue squares colour is one of those three colours. So it's very tricky to make things look different. I can, however, change the shape of the black/white pawn so it's different, and have experimented with that earlier in this thread. The pieces are only 5 pixels wide, so that puts a severe limitation on their design.

Perhaps this has been mentioned - but would it be possible to give players the option of customizing their own color sets?

Link to comment
Share on other sites

 

10 hours ago, Gray Defender said:

One of the things I was having difficulty with was the colors for both sides are pretty close, the pawns are sometimes hard to tell apart for me, but I enjoy it nonetheless..

 

It's been an ongoing issue. The display is very limited.

Here's an effort to improve things - larger pawns and slightly different colour combinations...

391101279_ScreenShot2020-04-11at1_34_38pm.thumb.png.c3f9f81c942b046079cfb3b94411dc9a.png

  • Like 2
Link to comment
Share on other sites

I think I've found a good compromise. The adjusted colours/contrast shown above, but with the original pawn. But the top of the black pawn is shaded in the dark colour instead of the light colour. Still looks like a pawn, but now the white and "black" are much easier to distinguish.
 

1246115746_ScreenShot2020-04-11at7_00_44pm.thumb.png.4cb6f020123bcf315e29611474c24f0a.png

 

Edited by Andrew Davie
  • Like 1
Link to comment
Share on other sites

Well, I'm now pretty sure my first attempt at the quiescence was wonky. Broken. So that's removed for now. I know what to do - it's just that the recursive nature and complex bank-switching involved make things tricky to follow. So, I'll work on that.  Meanwhile, here's a 3ply binary with the new colours and pawn graphics for people to play with.

 

1482894176_ScreenShot2020-04-11at7_13_39pm.thumb.png.1ac36af7353abafc911194b4b1d9737c.png

For future reference...

 

COLOUR_LINE_1 = $94
COLOUR_LINE_2 = $4a
COLOUR_LINE_3 = $fa
BACKGCOL      = $00

 

chess20200411_3ply.bin

Edited by Andrew Davie
  • Thanks 1
Link to comment
Share on other sites

I had another go at the quiescence search. It still doesn't seem quite right. Anyway, here's the game I played to test it (3ply), at which it pretty much mopped the floor with me... until the endgame, when my superior capabilities pretty much embarrassed the engine and I checkmated while pushing forward a pawn. Mistakes made all around, and I actually enjoy playing against it, which is the whole point really. It does highlight what a crap player I am, though. A bit embarrassing.

 

  • Like 1
Link to comment
Share on other sites

15 hours ago, Andrew Davie said:

I get the feeling I'll be developing this for years.

This is going to become an epic thread for an epic game.

 

Can I add a few requests please. In any menu/options could you add a timer to restrict the time allowed for processing and a maximum ply search option.  A force best move would be nice too.

Link to comment
Share on other sites

49 minutes ago, Voxel said:

This is going to become an epic thread for an epic game.

 

Can I add a few requests please. In any menu/options could you add a timer to restrict the time allowed for processing and a maximum ply search option.  A force best move would be nice too.

1) There will be some level selection capability. I have some oddball ideas about how to do this. A timer is "complex" because searching is done depth-first. That's an issue because, and it's a bit hard to explain... Let's say you select 5 ply.  that is, the computer looks at all its moves, the player's responses to those, then the computer's responses to THOSE, then the player's responses to THOSE and finally the computer's responses to those. That's a lot of moves to look at.  But let's say it starts, and normally we want the computer to move within 20 seconds.  So, it's 1% though the search and the time expires. It has to choose the best move so far. OK, fine we can do that. But it's only 1% of the way through its selection. So the move chosen is going to be extremely poor.  So instead of a 5 ply search, then we just restrict it to (say) a 4 ply search.  This is very course granularity - because 2 ply is rubbish - we can never use that. 3 ply is OK, not great. 4 ply is better, but takes longer than the 20 seconds. So we have a dilemma. Either we have a crap search of 1% of the options, OR we have a very shallow search that plays terribly.
So, I'm planning on tackling this a different way. Instead of abandoning a search 1% of the way through, of doing a very "shallow" search, I'm thinking about pruning the moves that the search looks at. By that I mean somehow dropping moves before they're even searched. Consider the top-level of the tree which might have, say, 30 available moves. Now to search a 5-ply tree with 30 moves on each level means you search 30^5 nodes (not taking into account alpha beta).  So that's 24300000. Well this engine can't do that, but you get the idea.  But what if, what if... instead of 30 moves there were just (say) 10 moves.  Then it would have to search just 10^5 = 100000 nodes. Well, that's a lot different.  So if we had a way to simply select the first N moves on each level and just kind of HOPE that the best move is among them, then the system would still work. It would search to appropriate depth, but be very quick about doing it.  So the problem then becomes "how do we choose the best N moves, and cull the rest, BEFORE searching".  One way, as shown with the alphabeta pruning, is to put capture moves first. Captures are likely to be "good" moves. Another way is to do a short search just to get a basic idea of the move values, and then sort them based on the results of that. And then cull all but the first N.  There are ways.  Anyway, so that's my thinking.
2) A force best move suffers from the same situation (only 1% of the tree searched). It will work, and be easy enough to do, but kind of unfair to the computer.  
It all comes down to finding good/accurate/efficient ways to sort the moves before the search happens on those moves. If the better moves are earlier in the list, then of course if you force it to make a move, the chances it will have been looking at the better moves already. And again, if you cull N moves, then you want the best N first. So, sorting is key. 
It's a complex subject.

 

Edited by Andrew Davie
  • Thanks 1
Link to comment
Share on other sites

Thank you for that detailed exlpanation, (if only we had interactions like this with Atari - back in the day!).  I'll wait more patiently seeing how much work you have ahead of you.

 

On 4/10/2020 at 10:31 AM, Andrew Davie said:

chess20200409_quiescent_3ply.bin 32 kB · 10 downloads

 

If I can trouble you for some advice.  I'm playing the version above and enjoying it.  I've become stuck a couple of times with the queen side knight in two different games.

 

I move it and the game just stops. I'm moving from C3 to B5 in the image attached (and on the previous game moving the same knight from C7 to A8) and the the game stops. I'm emulating on an older version of Stella 3.9.3, it should work.

 

I know the game is in development, so there may be minor issues.

Chess20200409Q_3ply.bmp

Link to comment
Share on other sites

3 minutes ago, Voxel said:

If I can trouble you for some advice.  I'm playing the version above and enjoying it.  I've become stuck a couple of times with the queen side knight in two different games.

 

I move it and the game just stops. I'm moving from C3 to B5 in the image attached (and on the previous game moving the same knight from C7 to A8) and the the game stops. I'm emulating on an older version of Stella 3.9.3, it should work.

 

I know the game is in development, so there may be minor issues.

Chess20200409Q_3ply.bmp 787.31 kB · 2 downloads

 

I have never seen a bug like that. It may very well be a bug in the 3E emulation in Stella in that (very old?) version.

I don't really know what advice to give, other than upgrade Stella and see if it still happens. There have been a few emulation bugs found/fixed in recent months. It will be interesting to see if others are experiencing the same issue.

 

  • Thanks 1
Link to comment
Share on other sites

1 hour ago, Voxel said:

Especially when the picture is made to look bigger, you my friend should work in advertising!

That's because the easiest way to bring them up side by side was to launch two different versions of Stella, and apparently the newer version of Stella defaults to a bigger window size.  ? 

  • Like 1
Link to comment
Share on other sites

7 hours ago, Voxel said:

I've updated Stella and have resumed playing.

 

The game decides to capture my king.  So with that handicap out the way I keep playing.

 

Then the black Rook on A8 decides to capture my Pawn on A7.

 

All the pieces look on horrified at the resulting abomination, (to the left of the cursor).  I've not seen this before.

Chess20200409Q_3ply.bmp 956.79 kB · 9 downloads

 

Thank you, yes. This is a known issue with pawn promotion. The pawn square is incorrectly restored down in the tree, and when it tries to promote/flash, it is on the penultimate rank. I was working on this bug last night. Will be fixed soon.

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...