Jump to content

Looking for PHP Chess Script


andy75180

Recommended Posts

Hi, Does anyone know of any php scripts around that can play chess as an artifical intellegence player?

It wouldn't have to output any graphics, just return what position and piece it decided to move.

Any help with this one? Bit of a strange one I know.
Link to comment
Share on other sites

[!--quoteo(post=358245:date=Mar 25 2006, 04:31 PM:name=andy75180)--][div class=\'quotetop\']QUOTE(andy75180 @ Mar 25 2006, 04:31 PM) [snapback]358245[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Hi, Does anyone know of any php scripts around that can play chess as an artifical intellegence player?

It wouldn't have to output any graphics, just return what position and piece it decided to move.

Any help with this one? Bit of a strange one I know.
[/quote]

Andy

You'd have been better posting this in the 3rd party scripts forum. Either way, the first result that comes up typing 'php chess' into google is: [a href=\"http://www.redlionwebdesign.com/phpchess.htm\" target=\"_blank\"]http://www.redlionwebdesign.com/phpchess.htm[/a]
Link to comment
Share on other sites

Yes I have seen this website before on a search. But the script on that site is only for two players battling online. What I'm looking for is a script that acts like a computer player, playing chess against the user.

I've had a good look, but still no luck on any results.
Link to comment
Share on other sites

Well first off, since its going to be php, you will need a method of storing data, flatfile or a database, unless you put the data through constant submit forms, and resend the data of the move you made, and positions of everything. If it was javascript it would be a bit less complicated as far as moving goes... because plus if its through submit forms the data can very eaisly be altered... which if the game is just a fun game it doesnt matter, but if your planning on keeping records of who wins and such, youll need flatfile or a database... anyways...


artifical inteligence for this kinda thing is actually quite hard... your going to have to go 3 ways with this: determine the computers move based on the players move, basically design a way so the computer will always move a certain way if the play moves one way... like if the player moves say piece 2 forward to the left, the computer moves say piece 4 forward to the right... and it will always do that... you can add in some randomation as well... you can design it make it near impossible to win, I dont know how, but if you figure out how to counter every move the player does, and write it up, you can do that, or just completely randomize the computers moves... any way is going to be very difficult... AI is probably one of the most complicated things to do, I couldnt even write up some decent AI for tic tac toe.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

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

×   Your previous content has been restored.   Clear editor

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.