Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  aichess  (Read 5397 times)
0 Members and 1 Guest are viewing this topic.
Offline EnderGT

Junior Member





« Posted 2006-12-22 18:46:33 »

I can't access the javaunlimited site from here, so I can't check who it was that submitted this game (not me), but... if you've been hanging out at this board and haven't seen this game yet, you owe it to yourself to try it out.

I am not a great chess player - hell, I'm probably not even a good chess player - but this game is incredible for 4k. I have managed 2 wins and 2 draws against about 20 or so losses.

Maybe someone with access to both sites can post the link here so that others can enjoy? Thanks.

To the author: congratulations. This is easily one of the top 5 games, if not top 3.
Offline me

Senior Member


Projects: 4


Java games rock!


« Reply #1 - Posted 2006-12-22 20:46:23 »

I would repeat what you have said EnderGT! Awesome!

http://ulf.ofahrt.de/aichess4k/

It is fast
It is too good
It has even undo (right clicking)

Thank you, whomever made that!

Best regards from


M.E.
--------
Offline Morre

JGO Knight


Medals: 2
Projects: 10


I'm Dragonene on IRC.


« Reply #2 - Posted 2006-12-22 21:37:00 »

The author is UlfJack (or at least that's the nick he uses on IRC), and he's been trying to join these forums for some two weeks or something such. No admin has accepted him yet, but I would expect to see him around soon.

And I agree with you all, it's an awesome 4k game. Bloody awesome.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #3 - Posted 2006-12-23 14:31:31 »

Yep, he should get a platinum user account here. To at all think about doing a chess game in 4K is just mad. To actually do it is a super accomplishment, and to make it look and play so well might be the best technical feat of the 4K compo all time. Think this even beats realtime raytracing in 4K. Next rayraced chess  Cheesy  I am deeply impressed!

Offline ulfjack

Junior Member





« Reply #4 - Posted 2007-01-01 15:58:55 »

Heja, I've found a way to save another couple of bytes, so watch out for animations to come soon.  Wink

Btw. the castleing rule is not implemented 100% correct. Right now, you can't castle if the rook is under attack or would move through an attacked square. And there might be problems with some of the other more exotic rules (draw after 50 moves without taking a piece or moving a pawn, and draw after 3 times back-and-forth).
Offline ulfjack

Junior Member





« Reply #5 - Posted 2007-01-02 16:58:32 »

Got animations, undo/restart buttons, a button to change the difficulty level (easy,hard,impossible), and fixed the castleing bug. And still just under 4k.  Grin

The third difficulty level may be a tad slow.  Wink
Offline EnderGT

Junior Member





« Reply #6 - Posted 2007-01-03 20:27:57 »

The third difficulty level may be a tad slow.  Wink

3rd level? Hell, the 2nd level is taking several minutes to decide on a move on my machine (2.0 GHz Pentium M, 1 GB RAM). I'd hate to see how long the 3rd level would take! While computer is deciding on a move, the screen does not repaint (i.e. if I switch applications and come back, the screen is blank until the computer decides to move.) A different painting strategy might fix this. Also, some indication that the computer is still thinking might be nice - if you have the room, maybe make the mouse cursor into the busy icon? Also, you probably shouldn't be able to change difficulty levels mid-game, although I'm not sure how to fix this.

The animation is a very nice addition, helps to identify what move was just made. My only complaint is that the captured piece disapears before the moving piece arrives - this is a bit confusing on long piece moves. Maybe wait until the moving piece is only 1 square away before removing the piece?

And my final complaint - even on easy, it's too damn hard  Grin

Very, very, very well done.
Offline ulfjack

Junior Member





« Reply #7 - Posted 2007-01-04 17:09:09 »

1. no repaint while ai is working
While this is technically not difficult, I'd have to restructure some of the internal data structures.
*thinking*
Will see if I can fit it in.

2. doesn't show that ai is working
Well, it does show that it's Black's move, so as such, there is an indicator that the ai is working. I understand that changing the mouse cursor would be nicer (and a progress bar would be nicer still). I don't see either happening if I don't find a way to save another couple of bytes.

3. piece disappears before the other piece gets there
That is an artifact of how I do the animation. I can think of a different way (of doing the animation), but am not sure if I can fit it in.
*thinking*
Will see if I can fit it in.

4. the ai is too difficult
I already thought about this and I think that there might be a way to make the easy mode easier...
Will see if I can fit it in.

Thanks for testing and feedback! Although I can't promise that any of those things actually is going to change. It's already a pretty tight fit as-is. Although I already thought that the last version was a tight fit and I ended up saving ~350 byte.
Offline appel

JGO Wizard


Medals: 49
Projects: 5


I always win!


« Reply #8 - Posted 2007-01-04 17:38:09 »

If you need to optimize more, then post the code... pretty sure we can save you up to 100 bytes easily Smiley

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline EnderGT

Junior Member





« Reply #9 - Posted 2007-01-04 17:52:05 »

Thanks for testing and feedback! Although I can't promise that any of those things actually is going to change. It's already a pretty tight fit as-is.

Understood. Please don't take my feedback as criticism - I think you've done a fantastic job, and it just keeps getting better.

And yes, please do post the code, if you can. I'd love to see how you did it, in addition to trying to help in finding places to save space.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline moogie

JGO Knight


Medals: 11
Projects: 5
Exp: 10 years


Java games rock!


« Reply #10 - Posted 2007-01-05 01:26:25 »

Well, just by using the 4KJO tool with the published JAR file i was able to reduce by 158 bytes to 3923 bytes. (see attached)

If i had access to the source I would be able to further reduce it approximately another 150 bytes and bring it down to about 3800 bytes. This would be done by modifying the source such that the code to create the frame etc will be in the constructor and then remove the static main method. I would then create a pack200 archive and embedd into a class which loades this embedded pack200 archive.
Offline EnderGT

Junior Member





« Reply #11 - Posted 2007-01-05 15:28:20 »

I would then create a pack200 archive and embedd into a class which loades this embedded pack200 archive.

Woogley has spoken - Pack200 is permissable so long as the final jar file is self-executable.
Offline moogie

JGO Knight


Medals: 11
Projects: 5
Exp: 10 years


Java games rock!


« Reply #12 - Posted 2007-01-05 22:25:41 »

hmm, I would have though woogley would have spoken on this matter, may be he is on holidays? I will send him a PM.
Offline ulfjack

Junior Member





« Reply #13 - Posted 2007-01-06 02:16:01 »

Sure, the source code can be found here (NOTE: this file may or may not be updated to the latest version):

http://users.conquer-space.net/~ulf/aichess4k/aichess4k.java

I would be interested to hear any easy, yet significant optimizations (please don't waste time with changing | to || or something like that). I will have a look at the 4KJO tool.

My current approach at packing this into a jar is as follows:
1. compile with javac from sun 1.5.0_10
2. jar
3. optimize with proguard (http://proguard.sourceforge.net/)
4. unzip and rezip with kzip (http://advsys.net/ken/utils.htm)

Looking at the source, I feel like it could do with a couple more comments. I'm happy to answer questions about the source and algorithms, here or in irc (#lwjgl on freenode).

PS: I'm on linux here, so I can't use the 4KJO tool directly.


PPS:
1. no repaint while ai is working
Disregarding any potential race conditions, I can do this in about 4 bytes.

2. doesn't show that ai is working
This is damn expensive, at about 83 65 45 bytes.

4. the ai is too difficult
Weighting in at 3 byte. It's so damn stupid at the first level, I have to make the second level the default level.


PPPS:
And another go at ai settings. Now it's actually saving space, and IMHO, it's easier to beat at the easy level. And even the third level is actually playable in terms of performance.

New version is up, new source is up, and it's still below 4096. Testing and feedback is welcome.
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2


Make it work; make it better.


« Reply #14 - Posted 2007-01-06 05:27:15 »

I have been getting better results with 7zip over Kzip.  Also  I tried BJWflate and got another 10 bytes over 7zip.  Unfortunately BJWFlate is Windows only.

Also excellent job.  I play some chess and can beat all 3 levels.  However to fit how well it plays into 4k is amazing.  I think you should increase the difficulty of level 3 a little more if you can.

Offline ulfjack

Junior Member





« Reply #15 - Posted 2007-01-06 14:39:00 »

Made a big mistake when I rewrote the ai levels (the second and third were way too easy). That's fixed now.
Offline Rick

Junior Member


Projects: 1


Java games rock!


« Reply #16 - Posted 2007-01-06 16:33:28 »

Great job. One suggestion the black  pieces on the black squares are hard to see on my monitor, maybe red on black or black on red would be eaiser to see.

Offline nullterm

Senior Newbie





« Reply #17 - Posted 2007-01-08 22:44:51 »

Fantastic job.  I've found myself playing it for fun on several occasions.
Offline ulfjack

Junior Member





« Reply #18 - Posted 2007-01-08 23:10:42 »

I will see if I can get a better color scheme in.
Offline ulfjack

Junior Member





« Reply #19 - Posted 2007-01-21 17:59:47 »

I'm just realizing that noone bothered to post a link to the JNLP, so here it is:
http://javaunlimited.net/games/launch.php?type=jnlp&id=117

I've put in a new color scheme for the board: orange on orange
It's bright, but the pieces are better visible. Let me know what you think about it.

Cheers!
Offline EnderGT

Junior Member





« Reply #20 - Posted 2007-01-22 02:31:09 »

I've put in a new color scheme for the board: orange on orange
It's bright, but the pieces are better visible. Let me know what you think about it.

Wow, bright all right. I'd tone down the light orange by adding some blue, but the dark orange looks ok. Visibility is definitely better.
Offline princec

JGO Kernel


Medals: 282
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #21 - Posted 2007-02-01 12:14:22 »

This is absolutely amazing. Almost lost as well! It was touch-and-go. Mind you, I am a chess idiot.

Cas Smiley

Offline Malohkan

Senior Member




while (true) System.out.println("WOO!!!!");


« Reply #22 - Posted 2007-02-04 07:18:45 »

I lost on the first difficulty Sad  But wow, GREAT job!

Admin and Game Developer at
GameLizard.com
Play Rimscape!    |    Play Conquer!
Offline Guarmigue

Junior Member


Projects: 2



« Reply #23 - Posted 2007-02-18 21:35:30 »

Great job! I'm getting really impress about what people can fit in 4kb  Shocked

I'm bad at chest so it's a very changelling AI for me, but i won the first match in easy   Grin
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (38 views)
2014-04-15 18:08:23

BurntPizza (34 views)
2014-04-15 03:46:01

UprightPath (50 views)
2014-04-14 17:39:50

UprightPath (32 views)
2014-04-14 17:35:47

Porlus (49 views)
2014-04-14 15:48:38

tom_mai78101 (71 views)
2014-04-10 04:04:31

BurntPizza (130 views)
2014-04-08 23:06:04

tom_mai78101 (230 views)
2014-04-05 13:34:39

trollwarrior1 (193 views)
2014-04-04 12:06:45

CJLetsGame (200 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!