ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

queen attacks through rooks and bishops too
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Flat
View previous topic :: View next topic  
Author Message
Álvaro Begué



Joined: 09 Mar 2010
Posts: 34
Location: New York

PostPost subject: Re: queen attacks through rooks and bishops too    Posted: Wed Jul 28, 2010 8:51 pm Reply to topic Reply with quote

lech wrote:
Code:

// Find attacked squares, including x-ray attacks for bishops, rooks and queen
        if (Piece == ROOK)
            b = rook_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(ROOK, QUEEN, Us));
        else if (Piece == BISHOP)
            b = bishop_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(QUEEN, Us));
        else if (Piece == KNIGHT)
            b = pos.attacks_from<Piece>(s);
        else if (Piece==QUEEN)
           b= queen_attacks_bb(s, pos.occupied_squares() & ~pos.pieces(ROOK, BISHOP, Us));
        else
            assert(false);


If I were to try something like this, I would make bishops "transparent" only on diagonals and rooks only on rows and columns. This seems like a good thing to try, especially when evaluating king safety.
Back to top
View user's profile Send private message
Display posts from previous:   
Subject Author Date/Time
queen attacks through rooks and bishops too Marek Kwiatkowski Wed Jul 28, 2010 3:15 pm
      Re: queen attacks through rooks and bishops too Marek Kwiatkowski Wed Jul 28, 2010 5:42 pm
            Re: queen attacks through rooks and bishops too Robert Hyatt Wed Jul 28, 2010 6:02 pm
                  Re: queen attacks through rooks and bishops too Marek Kwiatkowski Wed Jul 28, 2010 7:15 pm
                        Re: queen attacks through rooks and bishops too Ralph Stoesser Wed Jul 28, 2010 7:28 pm
                              Re: queen attacks through rooks and bishops too Marco Costalba Wed Jul 28, 2010 8:42 pm
                                    Re: queen attacks through rooks and bishops too Marek Kwiatkowski Thu Jul 29, 2010 4:57 pm
                        Re: queen attacks through rooks and bishops too Robert Hyatt Wed Jul 28, 2010 7:37 pm
      Re: queen attacks through rooks and bishops too Tord Romstad Wed Jul 28, 2010 7:55 pm
            Re: queen attacks through rooks and bishops too Ralph Stoesser Wed Jul 28, 2010 8:36 pm
                  Re: queen attacks through rooks and bishops too Robert Hyatt Wed Jul 28, 2010 8:44 pm
      Re: queen attacks through rooks and bishops too Álvaro Begué Wed Jul 28, 2010 8:51 pm
            Re: queen attacks through rooks and bishops too Marco Costalba Wed Jul 28, 2010 8:53 pm
                  Re: queen attacks through rooks and bishops too Álvaro Begué Wed Jul 28, 2010 10:07 pm
                        Re: queen attacks through rooks and bishops too Marek Kwiatkowski Thu Jul 29, 2010 12:13 pm
                              Re: queen attacks through rooks and bishops too Ralph Stoesser Thu Jul 29, 2010 4:04 pm
                        Re: queen attacks through rooks and bishops too Marco Costalba Thu Jul 29, 2010 3:54 pm
Post new topic    TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads