Jump to content


Photo

Looking for PHP Chess Script


  • Please log in to reply
3 replies to this topic

#1 andy75180

andy75180
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationLondon, England

Posted 25 March 2006 - 04:31 PM

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.
Play chess online with real opponents worldwide!!
http://che55.com/

#2 redbullmarky

redbullmarky
  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 25 March 2006 - 05:38 PM

[!--quoteo(post=358245:date=Mar 25 2006, 04:31 PM:name=andy75180)--][div class=\'quotetop\']QUOTE(andy75180 @ Mar 25 2006, 04:31 PM) View Post[/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]
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

#3 andy75180

andy75180
  • Members
  • PipPip
  • Member
  • 22 posts
  • LocationLondon, England

Posted 25 March 2006 - 06:27 PM

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.
Play chess online with real opponents worldwide!!
http://che55.com/

#4 brokenhope

brokenhope
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 25 March 2006 - 07:05 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users