From an engines perspective there are indeed three stages – opening, middle game and endgame. In the opening and endgame the computer is really just accessing a large database. The opening database is a list of known good moves (of varying degrees of quality i.e. not perfect moves). The endgame tables are a list of known win / loss / draws. This leaves the middle game. You are correct in saying the computer uses heuristics to evaluate different positions and a form of brute force to search the alternatives. Over the years the heuristics have become more sophistated; the most important terms being material, mobility, passed pawn detection and king safety. However it is in the area of search where most progress has been made in the last 10 years. The best program (Stockfish), often selectively searches 35 moves deep in the middle game.