Author Topic: QB Chess converted to work in QB64  (Read 4902 times)

0 Members and 1 Guest are viewing this topic.

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
QB Chess converted to work in QB64
« on: July 19, 2021, 03:34:39 am »
In 2003, i have help to add mouse and wav support with the help of qb library. Since in QB64, this is integrated in the language, just have to modified it, to work with QB64.
* Deep Basic Chess.zip (Filesize: 1.56 MB, Downloads: 158)
« Last Edit: July 23, 2021, 04:49:50 pm by Reggie60 »

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #1 on: July 20, 2021, 07:59:51 am »
This is interesting thanks.

I've only a little time to check it out. Did have some difficulty getting a move made had to click it again and again, this was 1 move in about 6 that I made.

Yes, it's happened again in 2nd game today. I tried 2 different pieces and not in check, no reason why the moves wouldn't be allowed.
« Last Edit: July 20, 2021, 08:27:05 am by bplus »

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #2 on: July 20, 2021, 12:50:09 pm »
You click the piece, you want to move (not drag)and click the destination square, you can also type the move like e2e4 + enter.
with the mouse, if you press the wrong square, just right click the mouse to restart the move. Command you can type: exit, auto (play itself), go(play white), flip to reverse the board, new, and also time (ex. for 30sec, enter 30000).

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #3 on: July 20, 2021, 03:20:28 pm »
Twice I played it, and twice got a subscript out of range at line 3586.
Also, once has to type BACK twice to take back a move.  It'd look nicer
with modern fonts and less color.
It works better if you plug it in.

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #4 on: July 21, 2021, 12:43:53 pm »
i'm not the creator, he is https://www.chessprogramming.org/Deep_BASIC
here on the wayback machine, he release it, with some bugs still to fix: https://web.archive.org/web/20171221075513/http://home.pacific.net.au/~tommyinoz/db.html

for myself, i am working on that program and convert it to a UCI engine to use with Arena Gui.

When you got the bug at line 3586, his comment for that routine is for a passed pawn evaluation.

Just wanted for people to see, how a basic chess program work. There are stronger and faster free chess program all over the internet. ChessBrainVB program in VB6 !

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #5 on: July 21, 2021, 01:00:10 pm »
Just corrected his BACK function to do was you expected it to do !!!
* Deep Basic Chess.zip (Filesize: 1.56 MB, Downloads: 124)
« Last Edit: July 23, 2021, 04:50:28 pm by Reggie60 »

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #6 on: July 21, 2021, 01:42:46 pm »
Yarrrr.   I also wrote a chess program:

https://www.qb64.org/forum/index.php?topic=2437.msg116514#msg116514

It can beat a program called Minimax by D.Steinwender and Ch.Donninger
about 1% of the time.  I interfaced them and let them play hundreds of games.
It's my benchmark to know if/when my program is getting any smarter.

I should have studied how other chess programs work before doing my own.
My approach is somewhat different - rather than evaluate the board after x
plies, I evaluate each move.  So it's not too bright - but it looks nice!


chessjul17a.png
* chessjul17a.png (Filesize: 491.12 KB, Dimensions: 1366x768, Views: 246)
It works better if you plug it in.

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #7 on: July 21, 2021, 07:38:43 pm »
Hi Reggie60
welcome and thanks to sharing yuor port to QB64 of a chess program.
Running I have got this issue ... if your work has fixed yet this glitch ok.
 
DeepBasicBug.PNG

I'll download your latest version to play chess with it.

See later
Programming isn't difficult, only it's  consuming time and coffee

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #8 on: July 21, 2021, 08:12:32 pm »
Again I Reggie60.
Sorry but the error comes out again also with new version.

See Screenshot here
 
DeepBasicBug 2.PNG
Programming isn't difficult, only it's  consuming time and coffee

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #9 on: July 22, 2021, 04:06:11 pm »
Thank's for the screenshot, help a lot. Fix the subscript error. You can, test the 2nd screenshot bug by entering the command FEN and type GO to make the program play that position.

Have included the new file.
* Deep Basic Chess.zip (Filesize: 1.56 MB, Downloads: 147)
« Last Edit: July 23, 2021, 04:51:26 pm by Reggie60 »

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #10 on: July 22, 2021, 06:28:50 pm »
Hi Reggier60
if you don't dislike I'll continue to test your porting in QB64 of a Qbasic chess program

So I must say that I find this last version more powerful in moves

but in some situations the bug comes out!
see attachment
 
DeepBasic Chess bug.JPG

Thanks to share
Programming isn't difficult, only it's  consuming time and coffee

Offline Reggie60

  • Newbie
  • Posts: 6
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #11 on: July 23, 2021, 04:52:31 pm »
fix it

Offline TempodiBasic

  • Forum Resident
  • Posts: 1792
    • View Profile
Re: QB Chess converted to work in QB64
« Reply #12 on: July 24, 2021, 07:50:08 pm »
Reggie60
Hi, thanks for the adjournment of the program.
Now I got no error on runtime.
But it takes checkmate!
see screenshot
 
DeepBasic Chess OK.JPG


Now you must work more on AI power.
Thanks to share.
Programming isn't difficult, only it's  consuming time and coffee