Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: thepenguin77 on February 26, 2011, 08:49:40 pm

Title: Chess
Post by: thepenguin77 on February 26, 2011, 08:49:40 pm
To all the googlers who come through here. The newest version is over at ticalc.org (http://www.ticalc.org/archives/files/fileinfo/443/44398.html).



My friends at school told me to make chess. So I did.

I started this on wednesday, so it's pretty new. But it's awesome. :D

(http://img.removedfromgame.com/imgs/chess demo.gif)

This is me playing against the calculator. I played in 50% speed, so don't think I'm a chess genius. Some strange stuff happens in that game though, like me castling out of check (legal?), it cheating its way out of checkmate, followed by me losing my queen, and then it forks me with a knight.

Since you're wondering, here is how the AI works. It looks through every single possible move and gives it a rating. It then chooses randomly from the top 4 unless there is one clear obvious choice. This way, you don't always play the same game, but the CPU won't pass up an obvious move. This rating is calculated, as of now, by this formula.

4*capture + 3/2*(threatAgainstCpuFinal - threatAgainstCpuInitial) + (threatAgainstPlayerInitial - threatAgainstPlayerFinal)

Each piece is rated on the usual scale. (pawn = 1, bishop = 3, knight = 3, rook = 5, queen = 9, king = 10) To calculate threat, you look at the sum of the reward of all possible attacks. So if there is a lone rook out in the center, and two different pieces can capture it, the threat would be 5 + 5 = 10.

As far as grayscale goes on this one, I'm trying out a new system. The first time you run the program on your calculator, it asks you to calibrate the flicker and adjust the contrast. Then it stores these values internally and never asks you again. But what makes this one different is that when you send it to your friend, it will ask them to recalibrate it even though you have already done so on yours. How? Along with the contrast and delay, it also stores the calcSerial. So if the stored serial and the real serial don't match, it asks to recalibrate.

In it's current state, this game is very playable. The only thing it lacks is pawn promotion, but I even included en passant (http://en.wikipedia.org/wiki/En_passant). The menus however need serious work, the current ones are just to make navigation possible.

And for those people who will ask, GRAPH quits.
Title: Re: Chess
Post by: Yeong on February 26, 2011, 08:51:06 pm
Looks really nice! :D
Are you also gonna add difficulty?
Title: Re: Chess
Post by: FinaleTI on February 26, 2011, 08:53:04 pm
Awesome!
Will you be adding pawn promotion sometime soon? If so, then I'm definitely gonna give this to my friends, cuz they all play chess.
Title: Re: Chess
Post by: Yeong on February 26, 2011, 08:55:13 pm
if it turns out really good, I can stop my bro from bothering me to play chess with him!
(He joined chess club and he's keep bugging me to make me play with him. But when we play, I just pwn him no matter how hard he tried XD )
Title: Re: Chess
Post by: thepenguin77 on February 26, 2011, 08:58:43 pm
Looks really nice! :D
Are you also gonna add difficulty?

I'm trying. But I doubt I will have different difficulty settings because the hardest one probably won't be too difficult to beat.

Awesome!
Will you be adding pawn promotion sometime soon? If so, then I'm definitely gonna give this to my friends, cuz they all play chess.

Pawn promotion is pretty simple, so that will be in the next update.
Title: Re: Chess
Post by: ruler501 on February 26, 2011, 09:19:27 pm
Well now you only need two things (once you get pawn promotion working) port to Nspire obviously, and 4 way chess. It is an awesome game.
Title: Re: Chess
Post by: ztrumpet on February 26, 2011, 09:54:45 pm
This looks incredible!  This is the first Chess with AI that I've scene, so it's certainly going on my calc.  Wonderful job! ;D
I can't wait for Pawn Promotion. :D

Also, where's the calc serial number stored?
Title: Re: Chess
Post by: jnesselr on February 26, 2011, 09:57:07 pm
Actually, you also need this to work over gCn. ;-)

This is actually awesome.  I love the way you do grayscale.
Title: Re: Chess
Post by: yunhua98 on February 26, 2011, 10:02:48 pm
amazing, to think TI-Chess was so popular without an AI
Title: Re: Chess
Post by: ruler501 on February 26, 2011, 10:35:02 pm
I don't know if you'd be willing to do it but maybe you could make a variant that lets you play Shogi. It is a japanese version of chess. http://en.wikipedia.org/wiki/Shogi
It has slightly more complicated rules though.
Title: Re: Chess
Post by: leafy on February 26, 2011, 10:51:37 pm
You should still definetely put either link play or 2-player, though. It's more fun when you get to swear at your opponent and he has to listen.
I suck at chess.
Title: Re: Chess
Post by: ruler501 on February 26, 2011, 10:54:24 pm
I love chess. I have a tournament coming up I hope to get in one of the top 10 places

Its a district wide middle school tournament
Title: Re: Chess
Post by: Michael_Lee on February 27, 2011, 12:30:57 am
Chess?

/me downloads immediately
Title: Re: Chess
Post by: willrandship on February 27, 2011, 12:55:50 am
BTW castling out of check is illegal.

Nice to see this type of prog coming out again! Haven't seen a chess game since I left behind my 86 :P
Title: Re: Chess
Post by: Goplat on February 27, 2011, 02:03:54 am
Pretty nice. The AI occasionally works surprisingly well for being so simple. More often it doesn't do too well though, I've seen it just leave pieces undefended and let me take them for no reason. I guess the Z80 probably isn't powerful enough for something super sophisticated, though.

One bug I noticed: Queenside castling is broken... it moved the wrong rook (from the h-file to the f-file, instead of a- to d-), and overwrote my bishop :(
Title: Re: Chess
Post by: Munchor on February 27, 2011, 06:10:39 am
This is awesome, the speed, it gives you all possible directions, greyscale! Congratulations!
Title: Re: Chess
Post by: program4 on February 27, 2011, 01:28:53 pm
This is just impressive! I love playing chess, and sometimes I like an opponent to play against.

One bug I noticed though (I think): if you choose a piece (say the rook on A1 in the beginning), but that piece cannot move anywhere, I cannot deselect the rook and choose another piece.
Title: Re: Chess
Post by: Lionel Debroux on February 27, 2011, 01:33:49 pm
Good job :)
It's even harder to fit a decent chess AI on a TI-Z80 than it is on a TI-68k calculator (TI-Chess, which I maintain without having participated to the AI itself at all)...
Title: Re: Chess
Post by: Goplat on February 27, 2011, 01:37:53 pm
This is just impressive! I love playing chess, and sometimes I like an opponent to play against.

One bug I noticed though (I think): if you choose a piece (say the rook on A1 in the beginning), but that piece cannot move anywhere, I cannot deselect the rook and choose another piece.
It works for me. (press Clear to de-select)
Title: Re: Chess
Post by: mrmprog on February 27, 2011, 01:38:22 pm
Looks good. This is one of the first chess games I have seen with an AI. Any idea on the release date?
Title: Re: Chess
Post by: thepenguin77 on February 27, 2011, 08:22:51 pm
Also, where's the calc serial number stored?

I'm assuming you mean where in the calculator. It is in the certificate and is retrievable via bcall($807E) (http://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:807E).

You should still definetely put either link play or 2-player, though. It's more fun when you get to swear at your opponent and he has to listen.

It has 2-player mode. And soon it will spin the board around between turns. (So you are looking from the correct side.)

One bug I noticed: Queenside castling is broken... it moved the wrong rook (from the h-file to the f-file, instead of a- to d-), and overwrote my bishop :(

That used to work, but I must have screwed it up when I made castling stop disabling the AI.


Also, some things I have planned.
-Save games (multiple with a file name you pick)
-Look at board from correct side
-Undo button
-Options menu
-If the AI starts to take forever, I'll add in an option to disable grayscale during thinking
-The AI needs to understand piece protection, this will fix Goplat's problem and hopefully allow it to checkmate
Title: Re: Chess
Post by: some1specia1 on February 27, 2011, 10:44:02 pm
This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
Title: Re: Chess
Post by: ztrumpet on February 27, 2011, 11:22:20 pm
This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
I'm sure it will work on the 84+ emulator included with the regular Nspire. :)
Title: Re: Chess
Post by: some1specia1 on February 28, 2011, 12:04:50 am
This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
I'm sure it will work on the 84+ emulator included with the regular Nspire. :)
yes, but a link cable is necessary other than the one that comes with the tinspire itself. If I could get one of those that would then work great
Title: Re: Chess
Post by: Goplat on February 28, 2011, 12:06:28 am
This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
I'm sure it will work on the 84+ emulator included with the regular Nspire. :)
It runs (and you can exit it if you know the right keys to press) but you can't see anything but a white screen. I think TI's emulator doesn't support IM 2 interrupts.
Title: Re: Chess
Post by: DJ Omnimaga on February 28, 2011, 12:07:09 am
Wow this is nice already Thepenguin77! I like the graphics and I am amazed at how much done you have so far.

This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
I'm sure it will work on the 84+ emulator included with the regular Nspire. :)
yes, but a link cable is necessary other than the one that comes with the tinspire itself. If I could get one of those that would then work great
Didn't the regular link cable come with the TI-Nspire too? I got one when I bought my calc.

I guess someone could maybe convert this game to the TI-Nspire later if he understands both z80 ASM and ARM C.
Title: Re: Chess
Post by: Builderboy on February 28, 2011, 01:21:42 am
I remember I downloaded a chess game for my calc a while back, and it has AI as well, but it was not nearly as cool or awesome as this!  Excellent job and I can't wait for even more to be added! :D
Title: Re: Chess
Post by: TIfanx1999 on February 28, 2011, 08:24:48 am
This looks pretty sweet thepenguin77. I'll give it a look when I have some time. I'm also seconding the two player via link suggestion. ;)
Title: Re: Chess
Post by: JustCause on February 28, 2011, 10:27:59 am
I suck at chess, so this should keep me entertained for a while. Nice work!
Title: Re: Chess
Post by: thepenguin77 on February 28, 2011, 06:59:04 pm
This looks pretty sweet thepenguin77. I'll give it a look when I have some time. I'm also seconding the two player via link suggestion. ;)

I probably won't do link play because I don't see it being that necessary. It's very hard to do, especially because I would need to do USB linking. And in reality, it's not even that necessary, you could just hand your friend your calculator, especially if they are sitting close enough to use a link cable :D


I fixed the Queen side castling and I added in pawn promotion. The game also flips the board around when the black player is moving. This makes it slightly annoying to play against yourself, but it is disableable via an internal flag, which will be in the options menu.
Title: Re: Chess
Post by: jnesselr on February 28, 2011, 08:40:15 pm
This looks pretty sweet thepenguin77. I'll give it a look when I have some time. I'm also seconding the two player via link suggestion. ;)

I probably won't do link play because I don't see it being that necessary. It's very hard to do, especially because I would need to do USB linking. And in reality, it's not even that necessary, you could just hand your friend your calculator, especially if they are sitting close enough to use a link cable :D


I fixed the Queen side castling and I added in pawn promotion. The game also flips the board around when the black player is moving. This makes it slightly annoying to play against yourself, but it is disableable via an internal flag, which will be in the options menu.
You should use Calcnet routines.  Also, please make the switching optional, because I hate chess games that do that.  It just bugs me. ;-)
Title: Re: Chess
Post by: SirCmpwn on February 28, 2011, 09:09:26 pm
This would be amazing with GCN support.
Title: Re: Chess
Post by: ztrumpet on February 28, 2011, 09:46:50 pm
Wonderful.  This is simple amazing. :D
Title: Re: Chess
Post by: thepenguin77 on February 28, 2011, 10:02:24 pm
You should use Calcnet routines.  Also, please make the switching optional, because I hate chess games that do that.  It just bugs me. ;-)

Switching will be optional in the next update. But it only does it in two player mode, it one player mode it leaves the board in whichever orientation makes sense for the entire game.
Title: Re: Chess
Post by: TIfanx1999 on March 01, 2011, 04:49:09 am
This looks pretty sweet thepenguin77. I'll give it a look when I have some time. I'm also seconding the two player via link suggestion. ;)

I probably won't do link play because I don't see it being that necessary. It's very hard to do, especially because I would need to do USB linking. And in reality, it's not even that necessary, you could just hand your friend your calculator, especially if they are sitting close enough to use a link cable :D
True enough I suppose, but I'm curious. Why would using USB be necessary? Couldn't you just use the link port? There was another thing that I just thought of as well. I know many of your previous games used undocumented instructions and didn't run on the normal TI-83+. Is this one compatible with the normal TI-83+?
Title: Re: Chess
Post by: SirCmpwn on March 01, 2011, 05:45:30 pm
I finally got this on my calc, and here are my thoughts:
-The grayscale is flawless.  This is the most impressive to me.  Other games that claim to have flickerless grayscale should be ashamed.  The grayscale in this is freaking amazing.  It makes it look like the screen is built for grayscale.
-The AI is good, but it would be nice if I lost occasionally.
-The AI is stubborn as hell.  I've had three queens on the board against his king, and it has squirmed all over the board before I managed to capture him.
-Pass-the-calculator works fine, but link play would be nice.

Overall, I'm extremely impressed.
Title: Re: Chess
Post by: FinaleTI on March 01, 2011, 05:49:00 pm
Is it just me, or does it seem the opponent's king moves more than one space at a time sometimes?
Title: Re: Chess
Post by: Michael_Lee on March 01, 2011, 05:55:47 pm
No, it's not just you.  It does that to me too occasionally.

Since it always moves horizontally (at least for me, so far), I suspect it's castling when it shouldn't be?   /speculation
Title: Re: Chess
Post by: FinaleTI on March 01, 2011, 05:57:52 pm
That's kinda what I thought it seemed like.
Title: Re: Chess
Post by: thepenguin77 on March 01, 2011, 06:08:35 pm
I know many of your previous games used undocumented instructions and didn't run on the normal TI-83+. Is this one compatible with the normal TI-83+?

It's currently not compatible. The reason for the previous ones is not undocumented instructions, that only restricts use on Nspire, it's because of fastmode and crystal timers. Here are the current incompatablilites.
-Crystal timers /Nspire /83+BE (perfect grayscale and frame limiting)
-Fast mode /83+BE (perfect grayscale and fast thinking, in slow mode it would crawl even just moving the cursor)
-Extra ram page /83+BE (grayscale, not 100% necessary at the moment, but requires hacking otherwise)

It's vaguely possible I could make this work on an 83+BE, but it would be ugly (figuratively and literally)

I finally got this on my calc, and here are my thoughts:
-The grayscale is flawless.  This is the most impressive to me.  Other games that claim to have flickerless grayscale should be ashamed.  The grayscale in this is freaking amazing.  It makes it look like the screen is built for grayscale.
-The AI is good, but it would be nice if I lost occasionally.
-The AI is stubborn as hell.  I've had three queens on the board against his king, and it has squirmed all over the board before I managed to capture him.
-Pass-the-calculator works fine, but link play would be nice.

Overall, I'm extremely impressed.

Thanks, I have researched the LCD driver to make grayscale as perfect as possible, especially if you adjust your frequency right. (There's a topic around here somewhere.) And a better AI is in the works.

Is it just me, or does it seem the opponent's king moves more than one space at a time sometimes?

I just fixed that. It was because the CPU didn't tell the piece putting routine what piece it was putting, it just did it manually. Which meant the flags for the rooks moving never got set. The king was actually castling out there.
Title: Re: Chess
Post by: TIfanx1999 on March 01, 2011, 06:37:41 pm
Ah, too bad it's not compatible with the TI-83 BE. I'll have to wait to test it. D:/me wonders where his brother's TI-84 could be...
Title: Re: Chess
Post by: bluebl1 on March 01, 2011, 10:11:55 pm
stupid AI noob!!! it keeps cheating! Castling does NOT work that way!!! I found a way to beat it anyways. I put it in checkmate and had my queen on same horizontal line so even if it "castled" it wouldn't be safe. when i took out all of my opponents pieces including the king, the game didn't end.

I know he fixed the fake castling, but what happens when you win? I beat him and took every single piece but nothing happened...
Title: Re: Chess
Post by: Builderboy on March 01, 2011, 10:15:21 pm
thats not how you win at chess ;) You win by checkmating the king, so that he has no safe place to move.  Just removing all the other pieces doesnt end the game itself
Title: Re: Chess
Post by: Goplat on March 01, 2011, 10:21:33 pm
Yeah, but he said including the king. It should never be possible to actually capture the king, because it's illegal for your opponent to make a move that lets you do so.
Title: Re: Chess
Post by: Builderboy on March 01, 2011, 10:24:16 pm
Ooooh whoops i misread x.x
Title: Re: Chess
Post by: jnesselr on March 01, 2011, 10:36:06 pm
Hey, for some reason the cursor was messing up pretty badly.  It was some random garbled thing.

OS 2.53 MP. (for integral function, and that's it)
Title: Re: Chess
Post by: thepenguin77 on March 01, 2011, 11:02:53 pm
stupid AI noob!!! it keeps cheating! Castling does NOT work that way!!! I found a way to beat it anyways. I put it in checkmate and had my queen on same horizontal line so even if it "castled" it wouldn't be safe. when i took out all of my opponents pieces including the king, the game didn't end.

I know he fixed the fake castling, but what happens when you win? I beat him and took every single piece but nothing happened...

I know, I did that on purpose. I figured that for now, it would be better if you could continue playing on the off chance that the game glitches and pulls a false checkmate. Plus, as soon as you get checkmate, you can just quit.

Hey, for some reason the cursor was messing up pretty badly.  It was some random garbled thing.

OS 2.53 MP. (for integral function, and that's it)

This happens on my friends calculator also. He has 2.43. He said that a lot of other stuff was going horribly wrong too aside from the cursor. Tomorrow, I'm going to completely clear the calculator and see if that fixes it. If not, it must be related to hardware somehow. (Running the program from the homescreen didn't fix it either, so it's not specifically Mirage's fault. And it only uses 1 bcall the entire time, so it shouldn't be OS related either.)

Even weirder, the cursor graphic is not the very last thing in the program. All of the text comes after it. And the displaying routine isn't anything out of the ordinary.
Title: Re: Chess
Post by: jnesselr on March 02, 2011, 10:23:45 pm
I run it in DCS.  Also, the DCS icon is blank.  Plus, there should be an option to reset grayscale settings, as I want to change them.  Just corrupt a byte in the serial id, and restart the program should work.
Title: Re: Chess
Post by: leafy on March 02, 2011, 11:22:29 pm
It seems that whenever the AI gets checked, it always considers moving the king first before anything else, which is bad. I've checkmated it using just pawns that could have been taken by other pieces.
Title: Re: Chess
Post by: aeTIos on March 03, 2011, 03:12:24 pm
stupid AI noob!!! it keeps cheating! Castling does NOT work that way!!! I found a way to beat it anyways. I put it in checkmate and had my queen on same horizontal line so even if it "castled" it wouldn't be safe. when i took out all of my opponents pieces including the king, the game didn't end.

I know he fixed the fake castling, but what happens when you win? I beat him and took every single piece but nothing happened...

I know, I did that on purpose. I figured that for now, it would be better if you could continue playing on the off chance that the game glitches and pulls a false checkmate. Plus, as soon as you get checkmate, you can just quit.

Hey, for some reason the cursor was messing up pretty badly.  It was some random garbled thing.

OS 2.53 MP. (for integral function, and that's it)

This happens on my friends calculator also. He has 2.43. He said that a lot of other stuff was going horribly wrong too aside from the cursor. Tomorrow, I'm going to completely clear the calculator and see if that fixes it. If not, it must be related to hardware somehow. (Running the program from the homescreen didn't fix it either, so it's not specifically Mirage's fault. And it only uses 1 bcall the entire time, so it shouldn't be OS related either.)

Even weirder, the cursor graphic is not the very last thing in the program. All of the text comes after it. And the displaying routine isn't anything out of the ordinary.
That thing is auto-fix, it fixed itself in my case.
Title: Re: Chess
Post by: Freyaday on March 03, 2011, 03:48:30 pm
And I'm having trouble creating a Tic-Tac-Toe AI. I feel so inferior....
Title: Re: Chess
Post by: ferox on March 03, 2011, 03:51:21 pm
this is great. i used to play chess a while ago, but i quit (the time between moves takes ages IRL...).

This looks pretty sweet thepenguin77. I'll give it a look when I have some time. I'm also seconding the two player via link suggestion. ;)

I probably won't do link play because I don't see it being that necessary. It's very hard to do, especially because I would need to do USB linking. And in reality, it's not even that necessary, you could just hand your friend your calculator, especially if they are sitting close enough to use a link cable :D

i would still like 2 player link mode, that gives you more time to think, making the game faster. and on a side note: my link cable is 7.5 metres :P (mini usb)
Title: Re: Chess
Post by: DJ Omnimaga on March 03, 2011, 04:02:01 pm
stupid AI noob!!! it keeps cheating! Castling does NOT work that way!!! I found a way to beat it anyways. I put it in checkmate and had my queen on same horizontal line so even if it "castled" it wouldn't be safe. when i took out all of my opponents pieces including the king, the game didn't end.

I know he fixed the fake castling, but what happens when you win? I beat him and took every single piece but nothing happened...
Just so you know you should probably read the board rules at http://www.omnimaga.org/index.php?action=ezportal;sa=page;p=2 because name calling or being rude to someone else when giving feedback is against the rules. I rated down your post. Programming a chess game can be hard, so give Thepenguin77 some time to fix it. It already looks pretty good so far. Otherwise, welcome on the forums.
Title: Re: Chess
Post by: thepenguin77 on March 03, 2011, 09:09:18 pm
I run it in DCS.  Also, the DCS icon is blank.  Plus, there should be an option to reset grayscale settings, as I want to change them.  Just corrupt a byte in the serial id, and restart the program should work.

DCS icon is blank because I was too lazy to make one, (you have to remember the header is the first thing you make), but I'll make one. The option to reset grayscale will be here as soon as I get the options menu running.


It seems that whenever the AI gets checked, it always considers moving the king first before anything else, which is bad. I've checkmated it using just pawns that could have been taken by other pieces.

I'm sure that will fix itself with more AI updates.


I'm not going to quote anything, but the weird cursor was caused by me not nopping a byte on startup that was on the extra ram page, which is why ram clears didn't fix it. (Or flash formats lol)


Here's what I've added so far:
-AI checks to see if space it's moving to is protected
-AI has potential to check a lot of moves, (I made a chess board stack)
-Awesome drop down menu!
-Fixed cursor glitch
-Fixed weird king castling

I have a 7 hour car ride on saturday, so I'll probably release a copy after that, or maybe tomorrow.
Title: Re: Chess
Post by: DJ Omnimaga on March 03, 2011, 11:03:50 pm
Nice to see new updates. :D
Title: Re: Chess
Post by: ztrumpet on March 03, 2011, 11:09:07 pm
Awesome!  I cant wait!  Good luck. ;D
Title: Re: Chess
Post by: AngelFish on March 03, 2011, 11:14:45 pm
stupid AI noob!!! it keeps cheating! Castling does NOT work that way!!! I found a way to beat it anyways. I put it in checkmate and had my queen on same horizontal line so even if it "castled" it wouldn't be safe.

Please allow for games that are still in development to be finished before you pass that kind of judgment. :) I'm not aware of very many people who can produce perfectly bug free code with the first demo.
Title: Re: Chess
Post by: thepenguin77 on March 05, 2011, 10:14:25 pm
Update!! Yay!!

Things in this update:
-Menu system in place
-Drop down menu in game
-Saving games via quick save (save as... still in the works)
-Ending game to menu and quitting game to shell
-Loading games via Load (can handle up to 96 saved files)
-Options menu with 2P view option and calibrating grayscale
-Mirage picture

The menu system is graphically lacking at the moment. So I'm hoping to find or make some cool looking 4-level gray chess pieces to put on the left and right side.

And since I'm just a coding tank ;), there is a very real possibility that this program is going to end up crossing the 8811 boundary seeing as it is about 95% code and it is at 6430 bytes right now. It's also 4437 lines in notepad. I don't really care if I cross the boundary because since this is running on calculators with the extra flash page, there are all kinds of tricks I can pull. But mostly, I think it's just cool to have written 8811 bytes of code.

Edit:
   Redid file for graphmastur.
Title: Re: Chess
Post by: jnesselr on March 05, 2011, 10:37:45 pm
Nice.  You should write it with 8810 bytes of code.  Also, did you fix the icon thing?  It seems like it, but I don't have a real calc to test it with atm.  Also, could you make it so that the cursor returns to your last moved piece?
Title: Re: Chess
Post by: thepenguin77 on March 05, 2011, 10:48:39 pm
Nice.  You should write it with 8810 bytes of code.  Also, did you fix the icon thing?  It seems like it, but I don't have a real calc to test it with atm.  Also, could you make it so that the cursor returns to your last moved piece?

The icon thing is fixed. It's because I didn't nop a byte on the extra ram page, and then later assumed it was either 0 or 1.

And I just updated the file with the cursor going to the last piece you moved. I had to try to be quick before people downloaded it though because it causes save game incompatabilites.
Title: Re: Chess
Post by: program4 on March 05, 2011, 10:49:18 pm
This is awesome so far.  :D
I have a request, though: during 1 player games, after the enemy moves, the cursor shouldn't move to where the enemy landed on the previous turn.
Title: Re: Chess
Post by: mrmprog on March 06, 2011, 06:19:45 pm
Does this require the missing RAM pages on new calcs? I hope not, because it is awesome!
Title: Re: Chess
Post by: ralphdspam on March 06, 2011, 07:08:29 pm
Wow! Perfect grayscale! :w00t: :D
Title: Re: Chess
Post by: Camdenmil on March 06, 2011, 08:00:11 pm
It shouldn't, I think he's just talking about the one page that still exists. Also, the grayscale is the most perfect grayscale I've seen on ti 84 where the program actually does something other than just display grayscale.  ;D
Title: Re: Chess
Post by: thepenguin77 on March 06, 2011, 08:43:37 pm
Wow, I just sent this to my real calculator and the title screen looks like complete crap. It brings out all of the flaws in your LCD. So I will definitely be fixing that.
Title: Re: Chess
Post by: ralphdspam on March 06, 2011, 09:58:50 pm
O.O On my TI84+SE, it looks perfect. 
If you have any time, can you make a [perfect] grayscale tutorial?
Title: Re: Chess
Post by: Happybobjr on March 06, 2011, 10:02:34 pm
Wow, I just sent this to my real calculator and the title screen looks like complete crap. It brings out all of the flaws in your LCD. So I will definitely be fixing that.
ALCDFIX?
Title: Re: Chess
Post by: calcdude84se on March 06, 2011, 10:21:40 pm
The program actually sets the delay itself, so not a problem there. It does look kind of bad, though. (No offense, obviously :P)
Title: Re: Chess
Post by: DJ Omnimaga on March 07, 2011, 09:56:01 pm
I just tried this on my 83+SE and this is the best grayscale I ever seen on this calc. O.O

However, I noticed two problems:

-We cannot cancel a move. If you select a piece, it's over, you can't cancel to select another instead, you're forced to choose a new location where to move it, and if it happens to be blocked, then you're stuck there.

-Quick save brings a blank screen and I have to pull a battery.
Title: Re: Chess
Post by: ralphdspam on March 07, 2011, 10:23:13 pm
@DJ When you want to cancel a select, just hit clear.  Quick save worked on my TI84+.  It just brought up a blank screen for a few seconds.
Title: Re: Chess
Post by: DJ Omnimaga on March 07, 2011, 10:30:39 pm
Clear didn't do anything ???

Note, I use Doors CS7 so I don't know if it's because of that.
Title: Re: Chess
Post by: ralphdspam on March 07, 2011, 10:40:53 pm
I am running Chess_4, and I cannot live without DCS.  :)
You are on DCS 7.1, right?
Title: Re: Chess
Post by: thepenguin77 on March 07, 2011, 10:42:09 pm
I just tried this on my 83+SE and this is the best grayscale I ever seen on this calc. O.O

However, I noticed two problems:

-We cannot cancel a move. If you select a piece, it's over, you can't cancel to select another instead, you're forced to choose a new location where to move it, and if it happens to be blocked, then you're stuck there.

-Quick save brings a blank screen and I have to pull a battery.

That's odd. I can't make either of these bugs happen in DCS or MOS, on an 84+ or an 83+SE. I don't see how CLEAR could possibly fail without other things going terribly wrong, unless I forgot to uncheck some flag again. And for quick save, I blank the screen on purpose because flash writing disables interrupts, and not blanking it would result in ugly scan lines. A blank screen means that it failed in bcall(_arc_unarc). Is your archive excessively full? I didn't add in error handlers around the bcall, (which I will), so that could possibly be the problem.

Edit:
  By the way, once this program is loaded, it doesn't rely on the shell at all, and only relies on Ti-OS for making saved games.
Title: Re: Chess
Post by: DJ Omnimaga on March 07, 2011, 10:54:50 pm
Yeah I used DCS 7.1. And nah, my archive isn't full.
Title: Re: Chess
Post by: thepenguin77 on March 09, 2011, 05:09:32 pm
Well, the only thing I can say is that maybe your file is corrupted. It happens once in a blue moon, but it's possible. And if not, hopefully the next update fixes whatever the problem is.
Title: Re: Chess
Post by: Happybobjr on March 09, 2011, 06:11:08 pm
It happens once in a blue moon, but it's possible.
I used to have it happen to just about every other file.
Just putting it out there...
Title: Re: Chess
Post by: DJ Omnimaga on March 10, 2011, 06:14:48 pm
Ah ok, then I guess I'll retry. Keep in mind this 83+SE had problems before, such as battery power being drained in one day even if the calc is turned OFF and with a brand new lithium battery.
Title: Re: Chess
Post by: mrmprog on March 17, 2011, 10:16:29 pm
This game is great! Any updates?
Title: Re: Chess
Post by: thepenguin77 on March 17, 2011, 10:28:36 pm
Not much lately. I got Save As... working. Eventually I'll get some better AI, but I'm pretty busy/lazy right now with track.
Title: Re: Chess
Post by: phenomist on March 17, 2011, 10:48:20 pm
Slight AI problem, and a reason why one-turn value evaluation isn't necessarily the best option:

In the early game, you can get your queen out in the open, and the AI always tries to capture it by using his knights and bishops (often placing them in danger of, say, my pawns). One-turn value evaluation sees this as good, because its potential gain (+9) far offsets its potential (actually probable) loss (-3). This also creates a largely offensive-based AI, where the AI ignores defense almost entirely.

(Also, this pretty much rules out the AI from ever sacrificing material)

Nevertheless, I'd say that the AI can't get much smarter without pulling some computational feats that surpasses the speed of the processor :P, so still pretty impressive. Just throwing out some cases where the AI can potentially become even better :D
Title: Re: Chess
Post by: Builderboy on March 18, 2011, 01:19:01 am
Maybe it can put in a check where if it moves a piece into a spot that can be attacked, any points that the piece could take would be ignored.  Like if it saw moving the night could put it into danger, it would ignore that it could also threaten the queen because it would know that it would not be able to carry out the capture
Title: Re: Chess
Post by: Deep Toaster on March 19, 2011, 01:21:17 pm
6 pages late: WHOA THAT IS AMAZING. It has AI? O.O
Title: Re: Chess
Post by: Munchor on March 19, 2011, 02:43:01 pm
6 pages late: WHOA THAT IS AMAZING. It has AI? O.O

IT DOES HAVE AI, AND IT IS SUPERB
Title: Re: Chess
Post by: Deep Toaster on March 19, 2011, 04:29:22 pm
How is the AI? I'm not good at chess at all, so I can't tell.
Title: Re: Chess
Post by: Munchor on March 19, 2011, 04:40:21 pm
How is the AI? I'm not good at chess at all, so I can't tell.

There was no way to set how hard/bad it is but it was quite good. I think I won the only time I played.
Title: Re: Chess
Post by: calcdude84se on March 19, 2011, 05:02:13 pm
The AI works. Perfectly. Never seen an 83+ series chess program with AI before :D
However, as penguin77 himself has stated and the rest of us have agreed, it is rather awful :P
Sadly, it can't get much better without becoming horribly slow, and it's already somewhat slow as it is :/
Regardless, it is a great achievement and we'll keep looking for ways to improve the program :)
For me, personally, I always beat it, and I don't even consider myself that good of a player :P
Title: Re: Chess
Post by: Munchor on March 20, 2011, 10:53:42 am
The AI works. Perfectly. Never seen an 83+ series chess program with AI before :D
However, as penguin77 himself has stated and the rest of us have agreed, it is rather awful :P
Sadly, it can't get much better without becoming horribly slow, and it's already somewhat slow as it is :/
Regardless, it is a great achievement and we'll keep looking for ways to improve the program :)
For me, personally, I always beat it, and I don't even consider myself that good of a player :P

It's a calculator, for a calculator, it is damn great, but when compared to other Chess games, then we can say it's not so good.
Title: Re: Chess
Post by: DJ Omnimaga on March 25, 2011, 06:44:22 pm
I agree. That reminds me... I should really post a news about this at one point, although maybe another staff did before.
Title: Re: Chess
Post by: Munchor on March 25, 2011, 07:57:52 pm
I agree. That reminds me... I should really post a news about this at one point, although maybe another staff did before.

Good idea, it does deserve a news topic.
Title: Re: Chess
Post by: Deep Toaster on March 25, 2011, 08:10:32 pm
Done.

EDIT: My first news topic ;D
Title: Re: Chess
Post by: DJ Omnimaga on March 26, 2011, 03:15:17 am
Nice, thanks Deep :D
Title: Re: Chess
Post by: ikemike on March 26, 2011, 04:41:34 pm
Just sayin', this is nearly already the definitive chess program.

All of the following is IMO, so you know.
Sprites could be changed... If greyscale sprites are possible, they'd be great, but if you can't do that, at least change bishops and pawns. They're only two pixels apart, and it can get frustrating sometimes to tell the difference... =)
Also, I personally think the selection cursor should be third-tier greyscale, or flash faster. I've made some mistakes because I can't tell the difference between the selection cursor and the possible-moves boxes. Also, I think an option to not show possible moves should be available as well, since it's just a distraction to some...
The AI also tends to make really bad opening moves. I would recommend programming in a couple simple openings. If nothing else, have it start with king pawn or queen pawn most of the time... The game gets pretty bad when the AI starts by putting a knight on the rim. =D

Overall, absolutely great! My chess buddies'll love this.
Points made:
Greyscale sprites or Change bishops/pawns
Increase cursor flash-rate or make it third-tier greyscale
Make option to not show possible moves
Program in openings, or at least have it start with e4/e5/d4/d5.
Title: Re: Chess
Post by: program4 on March 27, 2011, 06:26:11 pm
Amazing, except for some bugs and improvements:

•make an option for the cursor to not change position after the AI moves
•take care of threefold repetition/50-move rule (if it's not too hard)
•take care of stalemate
•provide the AI with an opening book and endgame database, and make it so that it tries to checkmate, since even when I try to lose, the AI checks me perpetually or stalemates me (even when there is an obvious mate in one)
•odds (show a chess board; the user can click a square to toggle whether he/she starts with that piece in the beginning or not) so that the AI can be a challenge to beat
Title: Re: Chess
Post by: thepenguin77 on March 27, 2011, 08:23:53 pm
Sprites could be changed... If greyscale sprites are possible, they'd be great, but if you can't do that, at least change bishops and pawns. They're only two pixels apart, and it can get frustrating sometimes to tell the difference... =)

I agree that the bishop and pawn sprites are too close together, especially because when you highlight them, they look the same. However, I don't know what to use instead. The problem with grayscale sprites though is that it's hard to see them. The problem is that there aren't really any colors available to make the sprites with. You can't do much work with white and light gray because they are used in the board. Which only leaves dark gray and black, which depending on contrast, can look pretty similar.

Quote
Also, I personally think the selection cursor should be third-tier greyscale, or flash faster. I've made some mistakes because I can't tell the difference between the selection cursor and the possible-moves boxes. Also, I think an option to not show possible moves should be available as well, since it's just a distraction to some...

Changing the cursor isn't a bad idea, the question though would be which cursor to change, the current one or the new moves one. I'll make some changes and see which one looks better. I'll also add that option to disable the new move boxes, that's really easy.

Quote
The AI also tends to make really bad opening moves. I would recommend programming in a couple simple openings. If nothing else, have it start with king pawn or queen pawn most of the time... The game gets pretty bad when the AI starts by putting a knight on the rim. =D

For now, I'll probably leave the opening moves up to the AI. My goal is to get to the point where it figures out what to do by itself.

•make an option for the cursor to not change position after the AI moves

Ok, that's quite easy to do.

Quote
•take care of threefold repetition/50-move rule (if it's not too hard)

Those are the easy stalemates, I can do those with simple counters.

Quote
•take care of stalemate

Actually, after thinking about this. If I make a special stalemate routine, as opposed to using the AI routine to check for moves, stalemate detection shouldn't take more than .01 seconds.

Quote
•provide the AI with an opening book and endgame database, and make it so that it tries to checkmate, since even when I try to lose, the AI checks me perpetually or stalemates me (even when there is an obvious mate in one)

Again, I'm not going to do this for a while because it would be a heck of a lot easier if the AI can just figure it out.

Quote
•odds (show a chess board; the user can click a square to toggle whether he/she starts with that piece in the beginning or not)

So basically you can choose to handicap yourself? I'm not entirely sure what you mean.
Title: Re: Chess
Post by: program4 on March 27, 2011, 08:28:02 pm
Yeah. Basically, you play without a queen or knight (queen odds or knight odds), or without certain combinations of pieces (like 2 rooks). This could all be in the options menu.

Also, can there be an option to undo moves? Often I make a move by mistake and I can't go back and change it.
Title: Re: Chess
Post by: thepenguin77 on March 27, 2011, 08:30:36 pm
That's one I've thought about for a long time. I'll probably add it, but it will definitely be disabled by default.
Title: Re: Chess
Post by: thepenguin77 on March 27, 2011, 11:54:19 pm
Post Post (Double post)

I promised an update the other day, so here it is. I was going to add the whole big list up there ^^, but I figured I better get a version out considering the current one still has the dark gray background.

Changes: (I think)
-Black background
-Game stops at checkmate
-AI understands unprotected pieces
-Save As...

As with customs, a screenshot is also provided. (Screenshots make it look like progress was made :D)
Title: Re: Chess
Post by: DJ Omnimaga on March 28, 2011, 03:31:52 pm
Awesome! By the way the grayscale looked perfect on my 84+. I'm amazed we now finally have grayscale that looks as great as on 68K calcs or extremly close. Back in 2004-05, most people said this would never be possible.
Title: Re: Chess
Post by: calcdude84se on March 28, 2011, 03:37:11 pm
Hurray, updates :D
Can't wait to see the AI improvements, no matter that I can still beat it :P
Title: Re: Chess
Post by: Compynerd255 on March 28, 2011, 07:12:38 pm
I really wish I could test this. I only have an 83+ Black Edition.
/me feels poor

EDIT: Although I could probably get sweet dough by making and selling professional looking gCn hubs for people with no electronics skills.
Oh, and it would be sweet if this game was compatible with globalCALCnet. :D
Title: Re: Chess
Post by: program4 on March 28, 2011, 08:45:31 pm
I played against the AI, and after 10 or so moves, after I leave the calculator for about 2 minutes without pushing a button, I try moving the cursor, but the arrow keys stop working (the cursor stops flashing also). I know the program didn't freeze, since the grayscale was still working (not black and white lines). I was forced to pull a battery. I have OS 2.43, but I don't know why this occurs.  ???
Title: Re: Chess
Post by: thepenguin77 on March 28, 2011, 09:30:02 pm
I played against the AI, and after 10 or so moves, after I leave the calculator for about 2 minutes without pushing a button, I try moving the cursor, but the arrow keys stop working (the cursor stops flashing also). I know the program didn't freeze, since the grayscale was still working (not black and white lines). I was forced to pull a battery. I have OS 2.43, but I don't know why this occurs.  ???

Arrrrg. (Pirate) It got stuck in some endless loop inside the AI. That should not be easy to find so it might be a while before I fix it.

Edit:
   I should make a button to abort the AI.
Title: Re: Chess
Post by: SirCmpwn on March 28, 2011, 11:57:36 pm
I was beaten by it for the first time today, but mostly out of stupidity <_<
Title: Re: Chess
Post by: thepenguin77 on March 29, 2011, 12:43:08 am
I was beaten by it for the first time today, but mostly out of stupidity <_<

Sir, you have completed a milestone. This is the first time anyone has actually been checkmated by it, which is a good thing for me ;)


Also, as for updates.
- new move squares are white and dark gray
- option to not move cursor to last AI move
- option to not show possible moves

Currently I'm working on really quick stalemate and checkmate detection. You might notice that the current version takes quite a bit of time to see if you are in checkmate.
Title: Re: Chess
Post by: c.sprinkle on March 29, 2011, 10:44:19 am
This is excellent! :D
I love the whole thing. This is the first AI chess game of its kind, for sure. Good luck on the updates; I can't wait for progress.
Title: Re: Chess
Post by: mrmprog on March 29, 2011, 10:48:14 am
By far, this is the best chess game I have found. Great job!
Title: Re: Chess
Post by: thepenguin77 on March 30, 2011, 04:53:10 pm
Eh.... Oops.

Not only is the current version slightly buggy (I don't know why though) I screwed up on the AI detection for protected pieces. I'd fix it, but the current state of the program is super-unstable, so sorry about that

-----------------------------------------------------------------------------------------------------------------------------
That is how to not double post.

The last version sucked, so I fixed it. New features:
-Check detection is like lightning
-Checkmate/stalemate detection is way faster than before
-Option to not move cursor after AI moves
-Option to not show possible moves
-Moves that put your own king in check are no longer displayed
-New move cursor is now white and dark gray
-AI is fixed
-No-move stalemate detection
-50 move stalemate detection (50 on each side right?)
-Holding CLEAR and pressing ON aborts all processes and quicksaves the game

Just to give you an idea of why the AI takes so long, the AI routine maxes out at a nested 8 calls 10 loop and 57 pushes to the stack. Each of those 10 loops does 8 iterations, so 8^10= 1,073,741,824 possible trials of the inner code. (Not really though because ever square is not filled with a piece that can move to ever other square, but you get the idea).

In other news, I have passed TI's limit for a program (~8100). All this speed comes from specialized routines which take up space.
Title: Re: Chess
Post by: ztrumpet on March 30, 2011, 05:08:00 pm
This sounds wonderful. ;D

(Actually, since this was a project update, you could have posted another post.  But, if you didn't want to double post, that's fine.  To clarify, you only have to wait for one hour before posting a project update.) :D

Great job, ThePenguin! :)
Title: Re: Chess
Post by: Deep Toaster on March 30, 2011, 06:31:50 pm
Incredible :crazy:
Title: Re: Chess
Post by: ralphdspam on March 30, 2011, 06:58:43 pm
Great!  The greyscale is wonderful!

I see that you changed the front screen. 
Title: Re: Chess
Post by: Madskillz on March 30, 2011, 08:51:41 pm
Here are those sprites penguin. They werent made by me, Raiser had made these at one time and sent them to me. I don't think I actually had a project going at the time and he had these laying around.

Do what you see fit, use them or not, I don't care ha. If you do use them, be sure to give Raiser credit. What you have is really great, and I'm not sure if these fit the style your going for. But I know I won't ever be making a chess game, especially as great as this one is. Keep it up man, this is fantastic.
Title: Re: Chess
Post by: ikemike on March 30, 2011, 10:15:38 pm
thepenguin77, I really have to congratulate you on this one. The AI is actually making decent moves. It's amazing! Whatever your AI is, it's great. I'd like it to be a bit faster, but if that's not possible, that's alright. However, a bullet chess mode where the AI is simplified and you're on a timer would be absolutely amazing! Since it's a calculator game, I'd imagine a fast mode would help its appeal, as not everyone wants to play a full-length game of chess. =)
Also, since the AI is turn-based (I think?...), I'd imagine Chess960 wouldn't be too tough to do either. I'd love it if you included stuff like that!
Madskillz, those sprites are amazing. It'd be pretty awesome if thepenguin77 could make the chess piece "sets" selectable, so you could choose between the 3D and 2D pieces.

Points made:
Bullet chess
Chess960
Swappable chess piece "sets"
Title: Re: Chess
Post by: c.sprinkle on April 01, 2011, 12:44:11 am
Also, I noticed that the AI doesn't understand sacrificial moves and will go right ahead and take my piece...

Other than that, though, excellent job!
Title: Re: Chess
Post by: mrmprog on April 03, 2011, 03:06:02 pm
The AI has improved a ton. It now can be much more fun to play.
Title: Re: Chess
Post by: ikemike on April 04, 2011, 06:25:40 pm
I don't know if your AI already does this, but I think you should specifically program the AI to prioritize controlling the center, especially early in the game. Right now the AI does strange moves half the time. It only really shines when more pieces come into play, limiting its options. I think making the AI prioritize controlling the center could really give the AI a significant boost in competency, especially when it's playing white. The AI isn't good at playing white because it doesn't really give much thought to the center, allowing you to take control of the game easily.

Of course, whether this would cause significantly more slowdown than there is already, I don't know... Maybe it could be an "hardcore" mode?
Title: Re: Chess
Post by: yoman82 on April 05, 2011, 06:11:58 pm
There was another chess game with an ai... and programmable difficulty. I'm not criticising you, I'm saying this because it was open source and you could look at the code. I could find it if you want
Title: Re: Chess
Post by: calcdude84se on April 05, 2011, 10:12:39 pm
yoman: Really? If so, that's pretty cool. Could you find it, please? :)
c.sprinkle: That would require looking several moves ahead; a bit much, I think :P
If thepenguin wants to make an attempt at that, that'd be interesting. Slow, probably :/
Title: Re: Chess
Post by: ikemike on April 05, 2011, 10:25:32 pm
I believe the program yoman is looking for is "Chessmaster 83", at http://www.ticalc.org/archives/files/fileinfo/236/23676.html (http://www.ticalc.org/archives/files/fileinfo/236/23676.html). It doesn't work in Mirage, which prevents me from testing it (I'm lazy.. =D), but I remember looking at it a while back.

Anyways, it DOES have AI, but it's (likely) the same type of AI that thepenguin77 is going for. I posted a comment a couple posts ago asking whether prioritizing center control was possible— I think that would really help the AI, as it would solve a lot of its problems, such as falling for scholars mate, putting knights on the rim, never doing e4/d4 as white, etc...
Title: Re: Chess
Post by: Deep Toaster on April 05, 2011, 10:32:37 pm
Quote from: User review
2. There is no difference between amateur and beginner except that one of them has a purposely inserted pause between each move.

O.O
Title: Re: Chess
Post by: thepenguin77 on April 05, 2011, 11:10:38 pm
I don't know if your AI already does this, but I think you should specifically program the AI to prioritize controlling the center, especially early in the game. Right now the AI does strange moves half the time. It only really shines when more pieces come into play, limiting its options. I think making the AI prioritize controlling the center could really give the AI a significant boost in competency, especially when it's playing white. The AI isn't good at playing white because it doesn't really give much thought to the center, allowing you to take control of the game easily.

Of course, whether this would cause significantly more slowdown than there is already, I don't know... Maybe it could be an "hardcore" mode?

I agree with that, I was playing today and I realized that the main reason that it fails so bad is that it has a poor opening. The hard part is telling the AI how to move towards the center because moving towards the center should never put the piece itself in danger, and this is a possibility if I give center moves a value. Also, whatever system is in place should probably only last about 10 moves, because especially in a 3 piece checkmate situation, it is pointless.

One thing I'm going to do to fix this is make the AI consider more move choices, right now it only looks at the last best 4, which is why black always moves the rightmost two pawns. I might also give the move a bonus if it moves a piece away from a wall, but it would have to be small so that it wouldn't put the piece in danger.


There was another chess game with an ai... and programmable difficulty. I'm not criticising you, I'm saying this because it was open source and you could look at the code. I could find it if you want

Sure, I'd love to see it if you can find it, although I believe the one you are talking about is TI-Chess (http://www.ticalc.org/archives/files/fileinfo/116/11606.html). It does have source but for one it is in C and I'm programming asm. I remember critor talking about this, and he said that he didn't even look at the AI code, he just got it from somewhere else. And lastly, the AI takes like 5 min to make a move and the 68k calculators are about twice as fast as the z80s. This means on the hardest difficulty it would take 10 minutes between moves and even then the AI isn't really all that great.

Edit:
   Sorry, missed a few posts.

Bullet chess
Chess960
Swappable chess piece "sets"

Bullet chess at the moment is not possible because to be fast, the AI would suck really bad.

Chess960 is a maybe, if I could work out the castling situation it would be pretty easy though.

Swappable piece sets will definitely be done. I'll probably also have just a plain letter set too for maximum readability.


@madskillz
    I'll try to use that sprite set when I add in sets. The only thing I worry though is that even zoomed in on that picture, I really couldn't tell the pieces apart.
Title: Re: Chess
Post by: ikemike on April 05, 2011, 11:45:50 pm
I agree with that, I was playing today and I realized that the main reason that it fails so bad is that it has a poor opening. The hard part is telling the AI how to move towards the center because moving towards the center should never put the piece itself in danger, and this is a possibility if I give center moves a value. Also, whatever system is in place should probably only last about 10 moves, because especially in a 3 piece checkmate situation, it is pointless.

One thing I'm going to do to fix this is make the AI consider more move choices, right now it only looks at the last best 4, which is why black always moves the rightmost two pawns. I might also give the move a bonus if it moves a piece away from a wall, but it would have to be small so that it wouldn't put the piece in danger.

--
Bullet chess at the moment is not possible because to be fast, the AI would suck really bad.

Chess960 is a maybe, if I could work out the castling situation it would be pretty easy though.

Swappable piece sets will definitely be done. I'll probably also have just a plain letter set too for maximum readability.

I still think a basic opening database would be extraordinarily helpful. I don't imagine (I don't know, though) it would enlarge the file much, and therefore it would act more human in that respect. Also, what do you mean by "only looks at the last best 4"?

Also, in bullet chess, thinking is not necessarily significant for much of it. But the AI would have to be highly specialized to counter easy mates for it to be decent, which may make it either significantly enlarge the program or be a separate file, and is probably a lot of work... Yeah, it's probably not worth it. =)

Another quick thing— I've done some (in-class) testing, and once or twice it hasn't recognized it could checkmate me. Is checkmate priority at max?
Title: Re: Chess
Post by: thepenguin77 on April 06, 2011, 05:54:08 pm
I still think a basic opening database would be extraordinarily helpful. I don't imagine (I don't know, though) it would enlarge the file much, and therefore it would act more human in that respect. Also, what do you mean by "only looks at the last best 4"?

Also, in bullet chess, thinking is not necessarily significant for much of it. But the AI would have to be highly specialized to counter easy mates for it to be decent, which may make it either significantly enlarge the program or be a separate file, and is probably a lot of work... Yeah, it's probably not worth it. =)

Another quick thing— I've done some (in-class) testing, and once or twice it hasn't recognized it could checkmate me. Is checkmate priority at max?

For opening moves, I think I've figured it out. I'm not going to implement it until I can get some major speed increases, but I think that if the number of moves available before and after the move is made are counted, then it should make some pretty good moves. Obviously using this system, the best first moves would either be the queen or king pawn, which is exactly what we want. Plus, moving a piece to the center of the board opens up a lot of moves, and while the AI doesn't realize it, it is taking a powerful position.

When I do the AI, it keeps a running list of the four best moves it's seen so far. Each move gets a rating and if it is better or equal to the lowest on the list, it boots it off and takes its place. This of course causes a problem when all moves are rated the same (first move) which is why the right two pawns are always moved first.

With the version you have, checkmate is not even considered. But on my newest version, if one of the moves is checkmate, it gets a rating of like 4000. Speaking of which: I lost to the AI today. I both failed and succeeded at the same time. I made an AI that could beat me, and I lost to a calculator AI. Oh well, it just keeps getting better.
Title: Re: Chess
Post by: ACagliano on April 09, 2011, 05:09:20 pm
Which is the latest? Is it uploaded already?
Title: Re: Chess
Post by: Deep Toaster on April 09, 2011, 08:33:04 pm
With the version you have, checkmate is not even considered. But on my newest version, if one of the moves is checkmate, it gets a rating of like 4000. Speaking of which: I lost to the AI today. I both failed and succeeded at the same time. I made an AI that could beat me, and I lost to a calculator AI. Oh well, it just keeps getting better.

Beat by your own creation... Robot wars just around the corner. And thanks to thepenguin77, humans are gonna lose D:

But seriously, that is awesome. It keeps getting better and better!
Title: Re: Chess
Post by: Munchor on April 11, 2011, 05:19:17 am
I only played once, and it was with the original AI, hence I won.

I'd like to try the most recent one, so I can see if I lose :P
Title: Re: Chess
Post by: thepenguin77 on April 11, 2011, 04:47:43 pm
Might as well post the most recent as I haven't worked on it in a while.

Updates look like:


It is pretty amazing, the only thing I did to make this faster was replace all the ldir's with a big ldi \ ldi \ ldi loop and I made a 25% speed increase. Who would have thought? But this version will beat you if you're lazy, so watch out.
Title: Re: Chess
Post by: ikemike on April 11, 2011, 05:05:11 pm
Might as well post the most recent as I haven't worked on it in a while.

Updates look like:
  • Fixed a glitch with best move selection (if there were two great moves instead of one, it might not pick neither)
  • If one of the AI moves is checkmate, it will take it
  • AI is faster


It is pretty amazing, the only thing I did to make this faster was replace all the ldir's with a big ldi \ ldi \ ldi loop and I made a 25% speed increase. Who would have thought? But this version will beat you if you're lazy, so watch out.
Neat! Now it's actually a threat (sorta)!

Personally, I think it'd be awesome if you defaulted the first move to e4/d4. As the program is right now, I still can't show it to my chess buddies without them mocking it for it's opening. As a temporary solution, I don't imagine programming this in would be particularly difficult (what do I know, though), and it would make the AI "presentable" for the duration where center-priority AI is still not there. I know how hard it can be to motivate yourself to program (I've got a whole bucketload of assets for a "Every Day the Same Dream" port, but I have no motivation to make it), but if you could set a date to have center-prioritizing AI done, I think all of us would really like it...

All I'm saying is I'm really excited for this particular project, and would really, really like to see it done or appear so. =)
Title: Re: Chess
Post by: thepenguin77 on April 11, 2011, 05:41:58 pm
I'll get the center moving stuff done eventually, it's the next AI improvement I'm going to do. But first I have to rearrange some other stuff to make it happen, like two byte move scores. The other problem is that I need to optimize some other stuff too because counting the moves is going to take a serious toll on it's decision making time.


The reason I'm not getting it done is not because I'm not motivated to work on it. It's because I don't have the time. I get home from track at 5:30 and I have to start on homework by 8:30 so I don't end up going to bed at like 1. That leaves 3 hours of free time, 1.5 of which will be wasted on something random, like omnimaga for instance. (Not saying omnimaga is waste of time, just in this sense it's not programming) Then comes the problem of how long it takes to actually make changes. After I made the changes above, I tried to make it faster in another way. But that actually made it slower. So making it took about 1.5 hrs, debugging took another half, and getting rid of it took about 1. That right there is two days.

Not to mention I have track meets tuesday and thursday which I get home at 9 from.
Title: Re: Chess
Post by: Compynerd255 on April 11, 2011, 05:46:44 pm
Personally, I think it'd be awesome if you defaulted the first move to e4/d4. As the program is right now, I still can't show it to my chess buddies without them mocking it for it's opening. As a temporary solution, I don't imagine programming this in would be particularly difficult (what do I know, though), and it would make the AI "presentable" for the duration where center-priority AI is still not there. I know how hard it can be to motivate yourself to program (I've got a whole bucketload of assets for a "Every Day the Same Dream" port, but I have no motivation to make it), but if you could set a date to have center-prioritizing AI done, I think all of us would really like it...

Although taking the center is what you usually want to do, there are several openings that are useful that don't take the center, such as the Grob (http://en.wikipedia.org/wiki/Grob%27s_Attack). Although your chess buddies might decide that not moving the king's pawn is a terrible idea, the AI's opening might surprise them.
Title: Re: Chess
Post by: ikemike on April 11, 2011, 06:22:37 pm
Sorry thepenguin77— I forgot that was a reason too. =| Anyways, great work. At least this won't take as long as Spencer's Zelda... This has already gotten a significant amount of progress in 1.5 months, and I guess I should be happy about that. xD

Compynerd255— Irregular openings can be surprising, and may end up taking the win, but it's not good practice for tournaments to play against an AI that doesn't take the center... I'd go as far to say 99% of competitive chess games start with white taking the center in some fashion, whether it be e4/d4/c4/nc3/nf3.
Title: Re: Chess
Post by: Deep Toaster on April 11, 2011, 06:53:30 pm
It is pretty amazing, the only thing I did to make this faster was replace all the ldir's with a big ldi \ ldi \ ldi loop and I made a 25% speed increase. Who would have thought? But this version will beat you if you're lazy, so watch out.

That's a big optimization :D The AI is starting to get good, and to think it's on a calculator O.O
Title: Re: Chess
Post by: Compynerd255 on April 11, 2011, 08:39:30 pm
I'd like to see variable strength AI that you can set, so that this game wouldn't be limited to 2-player setups or chess players of a certain strength. It would also be cool if the game adapted to your strengths and fought you where it knew you were weak.
Title: Re: Chess
Post by: ikemike on April 12, 2011, 04:27:06 pm
Some bugs in the new version:
- Checkmate is only recognized as "check".
- When the checkmate condition is realized, the opponent loses the ability to move. However, you can still move.
- Once the opponent loses all their pieces, it is then recognized as "checkmate".
- It also recognizes certain conditions as "checkmate", even when it isn't. The particular condition it this this to me was when the king was against the wall and it only had one possible move.

Another thing: I finally got around to giving this game to my friend, and he played it a couple times. His opinion, which is mine as well, is that the game would benefit enormously from an opening database. I know I've already said this too many times, but please consider it when the optimization is done...
Title: Re: Chess
Post by: thepenguin77 on April 12, 2011, 08:55:46 pm
Sorry, about the checkmate thing. That was probably when I got rid of the that bad optimization I talked about, I must have messed that up because it used to work flawlessly. I'll get it fixed.

And the opening move database is definitely not happening. It is useless code with too many conditionals. What if the opponent responds in an unusual way? You have to make a new set, but what if they do another unusual move... This ends up with >1000 lines of code that will soon become obsolete.
Title: Re: Chess
Post by: ikemike on April 12, 2011, 09:14:27 pm
And the opening move database is definitely not happening. It is useless code with too many conditionals. What if the opponent responds in an unusual way? You have to make a new set, but what if they do another unusual move... This ends up with >1000 lines of code that will soon become obsolete.

I suppose. I'm not exactly sure how it could be done, but I envisioned it drawing moves from an appvar, choosing moves randomly from its opening database depending on the opponent's move, and if the opponent did something that wasn't in the repository, it'd start going on its own. It'd be an entirely different system before the AI kicks in, though, and I can imagine why you're reluctant. I'm just afraid this game won't be as human-like as it could without an opening database, as that's essentially what human players are— opening books before the opponent does something unusual.
Title: Re: Chess
Post by: ACagliano on April 13, 2011, 05:01:00 pm
I second the checkmate glitch. The game no longer detects checkmate. It reports it as check.
Title: Re: Chess
Post by: mrmprog on April 22, 2011, 09:34:22 pm
Any fixes?
Title: Re: Chess
Post by: DJ Omnimaga on April 22, 2011, 10:10:58 pm
I'M glad to see updates to this. Hopefully you can get remaining bugs fixed soon. Are you gonna upload it in the downloads section and ticalc.org afterward?
Title: Re: Chess
Post by: Munchor on April 24, 2011, 08:17:46 am
I'M glad to see updates to this. Hopefully you can get remaining bugs fixed soon. Are you gonna upload it in the downloads section and ticalc.org afterward?

I'm sure it'd get featured on ticalc.org :D

EDIT: @DJ: Your respect rating is almost 1000 O.O
Title: Re: Chess
Post by: ztrumpet on April 24, 2011, 11:56:08 am
EDIT: @DJ: Your respect rating is almost 1000 O.O
IT'S OVER 900.0!!!!!!!!!!!! ;D

But seriously, yeah, this should get featured, not that you're new to being featured. ;)
Title: Re: Chess
Post by: Deep Toaster on April 24, 2011, 12:45:03 pm
But seriously, yeah, this should get featured, not that you're new to being featured. ;)

Heh, true.

Stop making epic programs. Give someone else a chance >:(
Title: Re: Chess
Post by: DJ Omnimaga on April 27, 2011, 02:24:11 pm
Lol, that kinda reminds me the days where every two month I had a program feature on ticalc.org (see news from October 2004 to February 2005). Technically it's much faster than that, though, because the first time I got two features at once (ROL3 and Zelda) and the third time it took 3 weeks for ticalc.org to process my file from the pending queue, so technically Reuben Quest 2 feature would have occured 3 weeks after the first. :P
Title: Re: Chess
Post by: thepenguin77 on April 27, 2011, 10:55:56 pm
Stop making epic programs. Give someone else a chance >:(

Now's your chance. Track and AP homework have me tied down for a while so you can get ahead of me with some crazy program.

But after the AP tests and track are done...
Title: Re: Chess
Post by: mrmprog on May 10, 2011, 10:19:03 pm
So...
Are there any updates on their way?
Title: Re: Chess
Post by: thepenguin77 on May 10, 2011, 10:23:48 pm
Not yet, I hope there will be soon though. I have my last 2 AP tests tomorrow, so after that, I am down from 6 classes to 2.

I have some things I want to do like: better AI (duh), fine tuning grayscale, maybe piece sets, speed increases, maybe the mode where you can choose what pieces to play with, and lastly I might try to make a better title screen.

But for right now this isn't on my priority list. I tend to work a bunch on one thing at a time, and right now, that is zStart. So when I get board with that, I'll probably be back here.
Title: Re: Chess
Post by: DJ Omnimaga on May 10, 2011, 11:43:08 pm
I thought the grayscale was fine ??? Or do you mean it would automatically sync itself with the LCD?
Title: Re: Chess
Post by: calc84maniac on May 11, 2011, 12:00:13 am
Or do you mean it would automatically sync itself with the LCD?
Unfortunately, that's not possible as there is no way through software to determine the refresh rate.
Title: Re: Chess
Post by: DJ Omnimaga on May 11, 2011, 12:03:19 am
Ah ok, sorry to hear. I am curious what he means, then. I personally had no issue with the grayscale quality on my SE and 84+. I tried on OS 1.19 and 2.71MP.
Title: Re: Chess
Post by: thepenguin77 on May 12, 2011, 04:43:19 pm
There's nothing wrong with the grayscale. I'm just going to add an option to fine tune it even farther. It's not enabled by default so those who want to spend time getting it just perfect can do it if they want.
Title: Re: Chess
Post by: ralphdspam on May 13, 2011, 11:48:35 pm
Enhance the most perfect grayscale I have ever seen?  Thepenguin77, you are my hero!  :D
Title: Re: Chess
Post by: Deep Toaster on May 14, 2011, 09:36:04 am
There's nothing wrong with the grayscale. I'm just going to add an option to fine tune it even farther. It's not enabled by default so those who want to spend time getting it just perfect can do it if they want.

It's projects like this that make me wonder if TI calculators actually support grayscale natively O.o
Title: Re: Chess
Post by: thepenguin77 on May 14, 2011, 09:49:26 am
I've thought about that too. But the main problem I see is an 80% decrease in battery life. Check out this awesome post (http://www.unitedti.org/forum/index.php?s=8b48775061829cd71e6d4471511c72a1&showtopic=9697&view=findpost&p=143775) by Dr. Dnar.
Title: Re: Chess
Post by: DJ Omnimaga on May 16, 2011, 10:06:19 pm
This is funny how this game grayscale looks much better than some 68K games :P
Title: Re: Chess
Post by: BrownyTCat on May 17, 2011, 02:32:08 pm
This is funny how this game grayscale looks much better than some 68K games :P
The game itself looks amazing. The graphics are practically perfect.
Title: Re: Chess
Post by: SirCmpwn on May 17, 2011, 02:38:13 pm
I recently downloaded the latest one, and haven't been able to beat it since <.<
Looking great!  I'm probably going to implement this sort of grayscale in KnightOS.
Title: Re: Chess
Post by: Deep Toaster on May 21, 2011, 08:08:33 pm
This is funny how this game grayscale looks much better than some 68K games :P
The game itself looks amazing. The graphics are practically perfect.

They are. Pity you don't code for the Nspire, or I can't imagine what you'd come up with.
Title: Re: Chess
Post by: yoman82 on June 02, 2011, 12:54:55 pm
has there been any progress on this, such as fixing the checkmate bug?
Title: Re: Chess
Post by: thepenguin77 on June 02, 2011, 03:14:32 pm
has there been any progress on this, such as fixing the checkmate bug?

Checkmate bug? I thought I fixed that back here (http://ourl.ca/9398/196619). If there's a new problem I'll fix it though.
Title: Re: Chess
Post by: yoman82 on June 03, 2011, 03:11:10 pm
You're right, thanks a lot. I was a version out of date.
Title: Re: Chess
Post by: Munchor on July 31, 2011, 10:53:41 am
I tried Chess 7.8XP, the latest version (I think), tried opening it with DoorsCS 7 (I saw the icon on Doors) and the calculator just froze (crashed) and I had to reset.

TI Nspire 84+ Keypad.
Title: Re: Chess
Post by: calcdude84se on July 31, 2011, 11:00:16 am
I don't think it will work on the Nspire's 84+SE since it doesn't emulate the crystal timers. Thepenguin77 might also be using some of the undocumented instructions, but he's definitely using the timers.
Title: Re: Chess
Post by: Munchor on July 31, 2011, 11:00:32 am
I don't think it will work on the Nspire's 84+SE since it doesn't emulate the crystal timers. Thepenguin77 might also be using some of the undocumented instructions, but he's definitely using the timers.

I see, thanks ;)
Title: Re: Chess
Post by: thepenguin77 on November 19, 2011, 12:58:42 am
I bet you weren't expecting an update here.

I now make the program look at all available moves instead of the best four. (It still only picks moves that are within 75% of the best move though) Also, the AI now also takes into account the number of moves available before and after its current move.

What does this mean? Opening moves don't suck and it actually puts in into some annoying situations. I've only played one game against it, and for a while, I was losing. Granted I'm tired, but still, it's definitely better.


Lastly, in the process of all this, I found the glitch that made the white opponent suck, it will now play exactly like black.

Edit:
   I need to play with my math a little bit, this version favors the queen too much.
Title: Re: Chess
Post by: Jonius7 on November 19, 2011, 02:09:30 am
That sounds like a great improvement, ill download and play this now!
PS: I love chess. Chess is a great game.
PPS: Review: Looks quite nice, u really made good use of the screen space. What you could do is on the left and right margins is show what pieces have been taken.
AI is ok, but I still managed to beat it with a knight fork on rook&king leading to the king moving to a vulnerable position.
A weakness is that it always wants to retreat after it attacks
Title: Re: Chess
Post by: Deep Toaster on November 19, 2011, 12:40:52 pm
I'm not sure if it was an old version or something, but a friend of mine showed me a bug where he could move his king in checkmate from the rook's position in one corner of his side of the board to the bishop's position on the other half of his side of the board.
Title: Re: Chess
Post by: mrmprog on November 19, 2011, 12:42:48 pm
Woot! Yay for an update! I will download it now! Out of all the games I have given my friends, this is one of their favorites.
Title: Re: Chess
Post by: thepenguin77 on November 23, 2011, 01:26:11 pm
Another update!!!


Most of the AI improvements were done through tweaking my formula. In fact, here is the formula:
Spoiler For Spoiler:
;rating:
;$8000 + ((8 * captured
;   - 7 * piece value(if dest is protected)         ;prefers suicidal trades
;   + 4 * piece value(if prev and if own protect back)
;   + 2 * unprotectedThreatToThem(final - init)
;   + 2 * unprotectedThreatToUs(init - final)
;   + threatToThem(final - init)
;    + threatToUs(init-final)
;      )*7
;   + usMoves(final-init)
;   - if (bPuttingInCheck) : - themMoves(final)
;      )*2

The pieces are rated, pawn - 1, knight - 3, bishop - 3, rook - 5, queen - 9, king - 10.

After all of the moves have been rated, the game then picks a random move within 75% of the top move and makes it.

The game clock has a range of 1 to 240 minutes counting by minutes and is very very accurate.

Also, while it might look like my idea to improve the title screen was just out of the blue, I cite myself:
The menu system is graphically lacking at the moment. So I'm hoping to find or make some cool looking 4-level gray chess pieces to put on the left and right side.

I must also thank mrmprog and aeTios for giving me the motivation to make a cool picture. (I made a sprite request, and they contributed pictures, only to have me use the one I converted :P)


Anyways, what else does this game need? I'm thinking about letting you set custom positions and such. Also, what are some areas where the AI doesn't do well? I know it's still moderately easy, but what makes it easy?

I'm pretty much out of ideas, so you tell me ;D
Title: Re: Chess
Post by: aeTIos on November 23, 2011, 01:27:50 pm
OMG! Epic! Those knights really fit in good!
Title: Re: Chess
Post by: ztrumpet on November 23, 2011, 01:59:55 pm
The one gray pixel in the middle of each Knight bothers me.  I think it should either be eliminated or a couple of other pixels should be added next to it.  Other than that, it looks incredible.  Excellent job.
Title: Re: Chess
Post by: aeTIos on November 23, 2011, 02:00:53 pm
Z, yeah you are right ^^ it looks a bit lost.
Title: Re: Chess
Post by: Hayleia on November 24, 2011, 12:35:05 pm
(Gaah ! too much updates on it !!!!)

O.O That menu is epic.
/me downloads... the screenshot :P

No, seriously, I downloaded it (the game) and that pixel is unnoticed on calc.
Also, I tried it (the game, once more) and I don't like the new AI because I lose more often like how the AI was improved :P, and the "move cursor to AI" option, and the savegame option and (I'll stop now or I'll never stop). In fact I love your game ;D !!!
Title: Re: Chess
Post by: mrmprog on November 24, 2011, 12:54:40 pm
The knight looks amazing, good job.
Title: Re: Chess
Post by: Sorunome on November 24, 2011, 01:20:33 pm
That is cool!
/me downloads
Title: Re: Chess
Post by: BalancedFury on November 24, 2011, 01:29:15 pm
Sorry, but didn't want to read above :P
This is for TI-84, right? :D
If it is, Good Job! ;)
I love chess! :w00t:
Also, I don't know if someone alrdy mentioned it but, add multiplayer thingy. :D
Title: Re: Chess
Post by: Jonius7 on November 24, 2011, 01:29:21 pm
Great update. As I said on the previous page, it might be nice to show in the left and right margins which pieces have been taken.
Title: Re: Chess
Post by: BalancedFury on November 24, 2011, 01:31:48 pm
True that ^^^ :D
Title: Re: Chess
Post by: Hayleia on November 24, 2011, 01:40:29 pm
Also, I don't know if someone alrdy mentioned it but, add multiplayer thingy. :D
Lulzwut ? Multiplayer is already available since the first version.
(In fact, I guess it is a lot easier to code than AI :P)
Title: Re: Chess
Post by: BalancedFury on November 24, 2011, 02:08:32 pm
Oh okay?
Title: Re: Chess
Post by: Jonius7 on November 24, 2011, 02:10:43 pm
Also, I don't know if someone alrdy mentioned it but, add multiplayer thingy. :D
Lulzwut ? Multiplayer is already available since the first version.
(In fact, I guess it is a lot easier to code than AI :P)
Yeah in earlier posts penguin said it was already completed and was working on AI
Title: Re: Chess
Post by: Happybobjr on November 24, 2011, 06:28:30 pm
Epic title screen!
Title: Re: Chess
Post by: mrmprog on November 24, 2011, 06:48:50 pm
The multiplayer mode is pass and play, if that is what you mean, not unit to unit.
Title: Re: Chess
Post by: Jonius7 on November 24, 2011, 06:55:15 pm
Yes. that's why it was the first mode there. Could also be used for testing the basic elements of the game.
Title: Re: Chess
Post by: BalancedFury on November 25, 2011, 08:42:51 am
I meant like connecting two of the same calcs and playing each other :P
Title: Re: Chess
Post by: thepenguin77 on November 25, 2011, 11:17:08 am
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.
Title: Re: Chess
Post by: ACagliano on November 25, 2011, 11:19:23 am
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.

thepenguin, why not provide support for 1v1 over gCn and Calcnet?
Title: Re: Chess
Post by: thepenguin77 on November 25, 2011, 11:20:20 am
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.

thepenguin, why not provide support for 1v1 over gCn and Calcnet?

I don't want any dependencies. If I do something, I like to do it myself.
Title: Re: Chess
Post by: ACagliano on November 25, 2011, 04:56:35 pm
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.

thepenguin, why not provide support for 1v1 over gCn and Calcnet?

I don't want any dependencies. If I do something, I like to do it myself.

well, I can understand that...I'm that way too. But let me clarify...I meant the ability to go onto a virtual hub and find a player on the network, who may be in another country and play against him. Not to use gCn for 1v1 over link...
Title: Re: Chess
Post by: BalancedFury on November 25, 2011, 05:46:40 pm
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.
Oh ok ;)
Title: Re: Chess
Post by: thepenguin77 on November 25, 2011, 05:50:31 pm
I meant like connecting two of the same calcs and playing each other :P

I've thought about that, the trouble is that linking is super hard. It's unreliable and a pain to test. So, you'll just have to give your calculator to your friend who is still probably sitting less than 1 foot from you.



thepenguin, why not provide support for 1v1 over gCn and Calcnet?

I don't want any dependencies. If I do something, I like to do it myself.

well, I can understand that...I'm that way too. But let me clarify...I meant the ability to go onto a virtual hub and find a player on the network, who may be in another country and play against him. Not to use gCn for 1v1 over link...

That's not a bad idea actually. I might end up doing that.
Title: Re: Chess
Post by: annoyingcalc on November 25, 2011, 09:25:25 pm
I wonder if I can beat thepenguin77 at chess?
Title: Re: Chess
Post by: mrmprog on November 25, 2011, 10:34:10 pm
I wonder if I can beat thepenguin77 at chess?
I doubt it :P From what I hear, he's pretty good.
Title: Re: Chess
Post by: annoyingcalc on November 25, 2011, 11:14:14 pm
I challenge thepenguin77 to a chess game
Title: Re: Chess
Post by: Yeong on November 26, 2011, 07:55:32 am
My brother is in chess club. :D
But I still beat him :P (without any proper knowledge of chess)
Title: Re: Chess
Post by: Sorunome on November 26, 2011, 10:36:08 am
Lol! :D :D :D
Title: Re: Chess
Post by: BalancedFury on November 26, 2011, 12:33:22 pm
Em hemm.... :P
I was in it for 3 months and i pwned most people there :D
So I can't see the future of the chessclub. :P
Title: Re: Chess
Post by: mrmprog on November 26, 2011, 01:00:49 pm
I have a suggestion: Make an option to have the AI "delay" a random amount each move so it can time out. The delay could be random, or it could depend on the rating of the move, delaying longer for a better move.
Title: Re: Chess
Post by: thepenguin77 on November 26, 2011, 05:29:24 pm
I wonder if I can beat thepenguin77 at chess?

I'm decent. But, ironically, I think making this game has made me better.

I have a suggestion: Make an option to have the AI "delay" a random amount each move so it can time out. The delay could be random, or it could depend on the rating of the move, delaying longer for a better move.

Well, I would do that, except I have a feeling it would make people really angry, especially since they know they are actually waiting for nothing.


Update!!


I have a screenshot of the cpu playing itself, but of course it doesn't start from the beginning because I couldn't show you how I got there ;D (The way to get there is very logical, if you figure it out, don't tell everyone)

I've also been meaning to let you customize your starting positions, and now you can. The instructions screen set a new record for me with 19 individual text strings.

I think that this might be good enough to send off to ticalc.org. Let me know if you think anything is lacking, but I believe this is it. (On a side note, I have 8766 bytes of executable code)
Title: Re: Chess
Post by: ztrumpet on November 26, 2011, 08:45:17 pm
Wow.  This is looking amazing.
I think this is the definitive chess game for the 83+ line.
Title: Re: Chess
Post by: TIfanx1999 on November 26, 2011, 08:56:26 pm
I'm going to say calc-to calc link play would be a cool feature to add also. If it isn't feasible, that's ok too though. :) You've really done a bang-up job with this. =)
Title: Re: Chess
Post by: Builderboy on November 26, 2011, 09:37:46 pm
There are some fairly simple and easy linking routines floating around that would make implementing calculator to calculator multiplayer very easy.  The question is, thought, why would you really need to :P While one person is making their move, the other is just going to be holding their calc, doing nothing anyways, the need for link play is fairly small imho. 
Title: Re: Chess
Post by: annoyingcalc on November 26, 2011, 11:19:31 pm
penguin77 do you have fritz 12? we could play through that

EDIT
I have a suggestion: Make an option to have the AI "delay" a random amount each move so it can time out. The delay could be random, or it could depend on the rating of the move, delaying longer for a better move.

Well, I would do that, except I have a feeling it would make people really angry, especially since they know they are actually waiting for nothing.

you could have an option for that
Title: Re: Chess
Post by: BalancedFury on November 27, 2011, 09:35:53 am
Finally a better chess game on the calculator then ChessMaster for TI-86 ;)
Title: Re: Chess
Post by: thepenguin77 on December 01, 2011, 04:31:51 pm
This is now over on ticalc.org (http://www.ticalc.org/archives/files/fileinfo/443/44398.html). So, to get the most recent version, you have to download it over there ;D

And you know what, I think I'll put this in the Omni archives as well, I need to start doing that.
Title: Re: Chess
Post by: DJ Omnimaga on December 01, 2011, 05:38:25 pm
Wow great to see this released. I am not much into chess anymore but this will defininitively be popular. What amazed me in this game was how perfect the grayscale was. Of course the rest of the game is awesome too. Great job. :)

Also good idea to put it in Omni archives. Just make sure the zip file is not 15 MB large. :P
Title: Re: Chess
Post by: ztrumpet on December 01, 2011, 05:38:44 pm
It's not *just* at ticalc, it's also featured.
http://www.ticalc.org/archives/news/articles/14/147/147694.html

Congrats on your fourth feature, ThePenguin!
Title: Re: Chess
Post by: DJ Omnimaga on December 01, 2011, 06:32:08 pm
Yeah i saw this earlier. Congrats :)
Title: Re: Chess
Post by: aeTIos on December 02, 2011, 10:15:16 am
I never got 100% clear what featured means.

EDIT: geez, found the ai vs ai easter egg ^.^
Title: Re: Chess
Post by: Stefan Bauwens on December 02, 2011, 03:56:09 pm
I never got 100% clear what featured means.

EDIT: geez, found the ai vs ai easter egg ^.^
When a program is featured on ticalc.org it gets a special color icon(green) and mostly gets a news article on the front page.
Ticalc.org features programs that they think stand out.
And every end of a year the featured programs from that year or choses to have a POTY.
Title: Re: Chess
Post by: guy6020665 on December 13, 2011, 06:40:14 pm
So I got chess off of ticalc it was version 1.1. I have an 83+BE, but my friend wanted it. So I tried to run it on my calculator, just for the heck of it, using mirage. It told me a BE wouldn't cut it and then exited out of the program and then mirage wouldn't load program names. Trying to run chess again while in this state causes a ram clear. And trying to exit mirage causes the calc to start displaying the ti os memory screen at 0 ram over the program less mirage image and then freezes there. I had to pull a battery.

I played the ai a couple of times. Once it took half my pieces before I could take any of theirs. Great job on this!
Title: Re: Chess
Post by: thepenguin77 on December 13, 2011, 06:42:13 pm
So I got chess off of ticalc it was version 1.1. I have an 83+BE, but my friend wanted it. So I tried to run it on my calculator, just for the heck of it, using mirage. It told me a BE wouldn't cut it and then exited out of the program and then mirage wouldn't load program names. Trying to run chess again while in this state causes a ram clear. And trying to exit mirage causes the calc to start displaying the ti os memory screen at 0 ram over the program less mirage image and then freezes there. I had to pull a battery.

Well, I fixed it  ;D

This is the same problem that caused version 1.1. Oh well, maybe this way it will scare people.
Title: Re: Chess
Post by: ACagliano on December 13, 2011, 06:54:17 pm
thepenguin, a great job. However, one issue of convenience.

I lose the game (or win). I then get the cursor, but am unable to move. The game should automatically quit and return you to the main menu. At current, you need to exit manually, then it asks you if you are sure you want to exit a game that is already over.
Title: Re: Chess
Post by: thepenguin77 on December 19, 2011, 03:17:28 pm
thepenguin, a great job. However, one issue of convenience.

I lose the game (or win). I then get the cursor, but am unable to move. The game should automatically quit and return you to the main menu. At current, you need to exit manually, then it asks you if you are sure you want to exit a game that is already over.

(I was gone)

I did this on purpose. In fact, you can even save the game at this point. The reason I did it this way is so you can show people the final situation. This especially applies in a two player game because when checkmate occurs, most likely the other person will be like "WTF?!" and they would want to study the board. The winner might also go run around the room with the calculator ;D
Title: Re: Chess
Post by: Deep Toaster on December 19, 2011, 04:27:26 pm
I personally like it like that. For board games, it's always nice to study how you lost the game. And I did lose, too, after reading
I lose the game (or win).
Title: Re: Chess
Post by: program4 on December 21, 2011, 11:28:51 am
This looks amazing right now. I can't stop playing this :P

How about including an option to undo a move? Sometimes, I would like to replay a situation and see what happens if I had played a different move.
Title: Re: Chess
Post by: aeTIos on December 22, 2011, 09:46:06 am
Winning is pretty hard with such an aggressive AI :P
Title: Re: Chess
Post by: thepenguin77 on December 22, 2011, 09:54:59 am
This looks amazing right now. I can't stop playing this :P

How about including an option to undo a move? Sometimes, I would like to replay a situation and see what happens if I had played a different move.

I also think it would be a nice idea to allow you to see what a different move does, however, an undo button would make the AI so much easier. I realize that not everyone would use it to cheat, but you have to admit, if you drop your queen on the 5th move, you're probably going to undo, and that's what makes my AI good.
Title: Re: Chess
Post by: Deep Toaster on December 22, 2011, 12:40:13 pm
What about putting a message on the screen for the remainder of the game as soon as the player undoes a move? That way he can practice with it and won't be able to claim he beat the AI if he cheated.
Title: Re: Chess
Post by: annoyingcalc on December 22, 2011, 02:39:19 pm
I beat the AI in the current version once and lost all the other times