user19717: I want to make a program that can identify chess tactics in the position, while searching moves according to given heuristics. but I am not sure exactly how to go about this. 
Related to this Is there a chess engine that does NOT use brute-force search?.
For example let's analyze this position:
[FEN "5rk1/p2Q1ppp/1q2pb2/2rp1b2/5B2/P1N1P3/1P3PPP/R4RK1 w - - 0 1"]

The best move is Na4 forking rook and queen. But Bd6 also forks two rooks but leads to a bad position.
A train of thought could be like:
If Bd6 attacks two rooks, Rxc3 captures knight;
    If bxc3 captures rook, Rd8 skewers queen and bishop on d6,
        If Bc7 attacks the queen, Rxd7, Bxb6 axb6
    If Bxf8, Rc7 attacks the queen,
        If Qe8 defends bishop, Qc6 attacks Qe8,
            If Qb8 moves the queen, Rc8 attacks queen and bishop.

In this position single move Na4 has the tactical motive of double attack, which should be fairly easy to spot. But it will also spot Bd6 move as a double attack, but needs to be searched further to decide that it's not working, maybe we need to spot all the other moves as uninteresting and not include in the output or the search.
A simple way to get started is to identify about pins, skewers, attacks, pressures, hanging pieces etc.
Apart from that, I am not sure what the next step should be, I mean I don't even know what the input and output should be to this program.
Is a single position enough to identify a tactical motif or a line needs to be given as input, in which case I need to come up with the best lines as
well.

user825: Yes, you can of course create a chess engine that does that. What you're saying is just a tiny part of engine search tree. You will need to read about more chess programming to get yourself started. Please come back when you have a concrete question.
Stockfish is free, why  not start from it?

19717: <p>I want to make a program that can identify chess tactics in the position, while searching moves according to given heuristics. but I am not sure exactly how to go about this. 
Related to this <a href="https://chess.stackexchange.com/questions/5056/is-there-a-chess-engine-that-does-not-use-brute-force-search">Is there a chess engine that does NOT use brute-force search?</a>.</p>

<p>For example let's analyze this position:</p>

<pre><code>[FEN "5rk1/p2Q1ppp/1q2pb2/2rp1b2/5B2/P1N1P3/1P3PPP/R4RK1 w - - 0 1"]
</code></pre>

<p>The best move is Na4 forking rook and queen. But Bd6 also forks two rooks but leads to a bad position.
A train of thought could be like:</p>

<pre><code>If Bd6 attacks two rooks, Rxc3 captures knight;
    If bxc3 captures rook, Rd8 skewers queen and bishop on d6,
        If Bc7 attacks the queen, Rxd7, Bxb6 axb6
    If Bxf8, Rc7 attacks the queen,
        If Qe8 defends bishop, Qc6 attacks Qe8,
            If Qb8 moves the queen, Rc8 attacks queen and bishop.
</code></pre>

<p>In this position single move Na4 has the tactical motive of double attack, which should be fairly easy to spot. But it will also spot Bd6 move as a double attack, but needs to be searched further to decide that it's not working, maybe we need to spot all the other moves as uninteresting and not include in the output or the search.</p>

<p>A simple way to get started is to identify about pins, skewers, attacks, pressures, hanging pieces etc.
Apart from that, I am not sure what the next step should be, I mean I don't even know what the input and output should be to this program.</p>

<p>Is a single position enough to identify a tactical motif or a line needs to be given as input, in which case I need to come up with the best lines as
well.</p>
 825: <p>Yes, you can of course create a chess engine that does that. What you're saying is just a tiny part of engine search tree. You will need to read about more chess programming to get yourself started. Please come back when you have a concrete question.</p>

<p>Stockfish is free, why  not start from it?</p>
