Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^4: Representing Complex but Static Data in Perl

by cyocum (Curate)
on Apr 07, 2005 at 14:50 UTC ( #445711=note: print w/replies, xml ) Need Help??

in reply to Re^3: Representing Complex but Static Data in Perl
in thread Representing Complex but Static Data in Perl

My algorithem choice was alphabeta and it is pretty slow probably due to the fact that I am still learning all the ins and outs of this kind of programming. Once I learn about how to write a good alphabeta, I will then move to something more interesting like MTD(f).

To work out the blocking pieces, you just run along the list of moves and check the square represented against the board, which can be passed to the function as a reference. Since the board is stored internally as a 8x8 multi-dim array, it is pretty easy to see if there is something there and of what color. I have a function called isOccupied to check and isColor to tell me the color.

Of course, this could all be negated by using bitboards but I am not comfortable enough with the idea yet to try it.

  • Comment on Re^4: Representing Complex but Static Data in Perl

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://445711]
[LanX]: Socrates was a Troll
[Your Mother]: It's very, very dangerous... Thinking that a group is intrinsically evil... buries the fact that all humans can be so deep that it starts to become likely they will be.
[Your Mother]: LanX++
[Corion]: (also the "troll for trolls sake" could seen be much like the "punk for punks beer")
[Your Mother]: I'm completely (historically anyway) a troll in real life. It's not fun online, you can't really win. :P
Happy-the-monk orders a Punk IPA.
[Your Mother]: Also, I'm too old to start fights with strangers anymore.
[LanX]: concentrating on omestic violence?
[LanX]: d
[Your Mother]: Open air violence. Or on campus.

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (18)
As of 2018-03-19 13:49 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (240 votes). Check out past polls.