Jump to content

Photo

Video Chess level 7


42 replies to this topic

#26 stabguy OFFLINE  

stabguy

    Combat Commando

  • 2 posts

Posted Sat Jun 4, 2016 8:38 PM

This is pretty cool. What is your chess playing background?


Casual/amateur. I learned how to play at age 5 and soon could beat everyone in my family and school. It's one of my lifelong hobbies but I never joined a chess club or played in any tournaments. I'm a professional computer programmer. In fact, back in 1983 when I played this chess game I was also attending high school and writing video games in 6502 and 6809 assembly language as a freelance developer.

It always amazed me that Atari could write a chess program with only 128 bytes of RAM. The gaming magazines at the time went on and on about the VCS limit of 3 (or 6) sprites per row and how this was overcome with the "venetian blind" trick. As if the hardest part of a chess program is the graphics.

Recently I Googled the subject again and mostly found the same garbage about venetian blinds. One comment here on AtariAge had a good clue. Usually a chess program is recursive and stores a complete board at each node in the call tree. Instead, you could just have a global board in RAM (say 32 bytes, one for each piece) and remember "diffs" so you can undo a move after considering it. If a diff was 4 bytes, you could recurse 5 ply for 30 bytes including the return address on the stack. This design might also explain the multiple move bug at levels 6 and 7. Perhaps moves didn't always get properly undone at deeper plies.
 

Oh wow, I forgot I'd even made this thread.


I joined this site just to reply! The Google search above led me here and this thread was crying out for someone with Video Chess level 7 experience.

#27 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • 5,091 posts
  • Location:The Sapphire Galaxy

Posted Sat Jun 4, 2016 8:48 PM

Hey, nice game! I beat the VCS on Level 7 too, albeit in emulation where I could crank up the speed -- but even then it took a long time, though the victory itself was relatively quick. I've previously posted the game here, but I'll add it here as well:
 
[Date "2012.06.21"]
[White "Atari Video Chess, Level 7"]
[Black "thegoldenband"]
[Result "0-1"]

1. e4 d5 2. exd5 Nf6 3. c4 c6 4. dxc6 Nxc6 5. Nf3 e5 6. Nc3 e4 7. Ng5 Bf5 8. Be2 h6 9. Nh3 Bxh3 10. gxh3 Bc5 11. O-O Qe7 12. Re1 O-O-O 13. Bg4+ Kb8 14. Nb5 Ne5 15. Be2 a6 16. Nc3 Rhe8 17. Qc2 Qd7 18. Na4 Qxh3 19. Nxc5 Nf3+ 20. Bxf3 exf3 21. Nd7+ Nxd7 22. Rxe8 Qg2# 0-1


attachicon.gifthegoldenband vs atari chess lvl 7.gif



#28 Link6415 OFFLINE  

Link6415

    Chopper Commander

  • 131 posts
  • balls-deep in the 6502
  • Location:Ohio

Posted Thu Aug 18, 2016 6:35 PM

All very cool.

#29 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Thu Aug 18, 2016 9:12 PM

Someone needs to look at the code and figure out exactly what causes that bug.

#30 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,577 posts

Posted Fri Aug 19, 2016 7:45 AM

Video Chess is one of my favorite 4K chess programs alongside the 1977 Fidelity Chess Challenger, I play level 6 frequently and have never encountered the double move bug or pieces moving arbitrarily.

 

There is a timeout screensaver that is more likely to be seen at level 6 and 7 which can make pieces arbitrarily vanish for a duration, but they all reappear in their correct position as soon as you move the joystick.

 

Some people may also forget where the pieces were between moves because you can't see the board while the computer is busy thinking in different colors :)



#31 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Fri Aug 19, 2016 8:16 AM

Video Chess is one of my favorite 4K chess programs alongside the 1977 Fidelity Chess Challenger, I play level 6 frequently and have never encountered the double move bug or pieces moving arbitrarily.

 

There is a timeout screensaver that is more likely to be seen at level 6 and 7 which can make pieces arbitrarily vanish for a duration, but they all reappear in their correct position as soon as you move the joystick.

 

Some people may also forget where the pieces were between moves because you can't see the board while the computer is busy thinking in different colors :)

 

So your theory is that the pieces aren't actually being moved, but rather that the screensaver makes them disappear briefly and people forgot where they used to be?  That would be interesting if it's the case as this bug is somewhat legendary. :)



#32 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,577 posts

Posted Fri Aug 19, 2016 12:00 PM

 

So your theory is that the pieces aren't actually being moved, but rather that the screensaver makes them disappear briefly and people forgot where they used to be?  That would be interesting if it's the case as this bug is somewhat legendary. :)

Yes, I've encountered this many times when I've come back to move and the screensaver has kicked in. Board always reverts to normal as soon as I move the stick and the normal Chess colors come back. If you don't end the screensaver it's easy to think the computer has been cheating and just turn the game off. 

 

The board vanishing between moves probably adds to the confusion.



#33 cryptoboy OFFLINE  

cryptoboy

    Combat Commando

  • 8 posts
  • Location:Livermore, CA.

Posted Mon Jan 2, 2017 2:23 PM

Has anyone ever made a commented disassembly of the 4K Video Chess rom?  I'd love to see how the game AI was implemented.



#34 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,548 posts
  • Location:The land of Gorch

Posted Sat Mar 4, 2017 7:48 PM

I don't think so.  However, here is a hack you can run at a very high framerate to cut down on the waiting.  The program will wait for a stick to center whenever moving the cursor, so you can run as fast as you want.  I threw in an odd/even scanline adjustment to fill in the pieces when using phosphor mode (rock stable @262 per frame, all HMOVE instructions at cycle 0).  Z26 is VERY quick when using -r99999!

Attached Files



#35 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,548 posts
  • Location:The land of Gorch

Posted Sat Mar 18, 2017 5:31 PM

Hacking the "Computer Chess" version to do the same, I spotted a glitch that I'd never noticed before. Most of the time, the AI (playing white) will begin by moving it's kings pawn forward 2 spaces. Threaten this position by moving your queens pawn two. The AI will defend its pawn position by moving its queens knight. If you then move your kings bishop pawn to threaten the pawn from the opposite side, it responds by taking this one. The bug is that the victorious pawn becomes yours!
C:E2-E4
P:D7-D5
C:B1-C3
P:F7-F5
C:E4-D5 +defect
This glitch is not present in the commercial game. Still looking for proof of any glitch there.

#36 Keatah ONLINE  

Keatah

    Quadrunner

  • 16,255 posts

Posted Sat Mar 18, 2017 11:38 PM

Oh what a cool hack.



#37 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Sun Mar 19, 2017 7:18 AM

Neat!

#38 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,548 posts
  • Location:The land of Gorch

Posted Mon Mar 20, 2017 4:59 AM

Computer Chess AI is kinda strange...it'll play until most of its high ranks are off the board, and then stop moving at all. No pawn promotions either.

#39 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Mon Mar 20, 2017 7:46 AM

Computer Chess AI is kinda strange...it'll play until most of its high ranks are off the board, and then stop moving at all. No pawn promotions either.

So there are no pawn promotions in computer chess at all or the computer AI just doesn't go for them?



#40 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,548 posts
  • Location:The land of Gorch

Posted Mon Mar 20, 2017 8:36 AM

None for both players. A pawn will just be stuck there upon reaching the other side. No setup mode either, so you can't even manually promote pawns.

#41 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Mon Mar 20, 2017 9:25 AM

None for both players. A pawn will just be stuck there upon reaching the other side. No setup mode either, so you can't even manually promote pawns.

Good to know, I need to update my page then.



#42 Tempest OFFLINE  

Tempest

    Monochrome Martinet

  • 25,788 posts
  • Location:Accardi-By-The-Sea

Posted Mon Mar 20, 2017 9:33 AM

How much space is left over in each version of the program?  I'm starting to wonder if they weren't forced to ditch the chess notation in the final version to make room for the pawn promotions, board setup, and bug fix, especially since they had to strip 2K out of it to get it down to 4K.  Just a theory.



#43 Nukey Shay OFFLINE  

Nukey Shay

    Sheik Yerbouti

  • 21,548 posts
  • Location:The land of Gorch

Posted Mon Mar 20, 2017 11:18 AM

That's hard to tell. In a near-completed stage like this, free space is gained through optimization - changing short JMP distances to relative branches, using subroutines for similar/duplicated code, rewriting sloppy routines, etc. There's nothing "unused" in that sense. I haven't looked at the earlier proto (I never bothered to play even this one much, and always assumed that the game worked correctly).  Undoubtedly, the caption bitmaps were removed out of necessity to make space for the fixes.  Might need some chess master's opinion about the higher gameplay levels - as far as I can tell, they don't affect the outcome much here.  For checking that, here is the finished hack for running at an emulator's top speed (w/phosphor mesh to fill in pieces).  It uses the left stick like the released game.  Like the above, you need to center the stick after each square.

Attached Files






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users