In this middlegame, Gold is well-positioned to attack the f6 trap with an elephant, horse, and dog. Gold rabbits might advance on the h-file to support the horse and assert a space advantage.
A trap attack is an attempt to take control of an opponent's home trap; if successful, this might lead to a quick cleanup and subsequent goal. An elephant often leads an attack, so that no friendly piece can be captured in the targeted trap. The enemy elephant might likewise defend the trap to prevent a cleanup; if a trap attack leads to an elephant deadlock, the attacker might then attempt an elephant rotation, which might free his own elephant to dominate the board while the threat of a quick cleanup and goal continues to restrict the enemy elephant. Alternatively, a trap attacker might be happy with an elephant deadlock if he is already strong elsewhere. A trap attack might sometimes create a quick double-threat on the wing; if an attacker flips an enemy piece homeward, the defender might not have time to save it.
A trap attacker usually wants to occupy at least two key squares, including a decentralized one. A defender can delay that by blocking paths. For example, a silver horse on b6 will block a gold horse from that square. As long as Silver herself is not attacking in the west, b6 is often occupied by a silver horse.
If b6 is inaccessible, a gold attacker might try to reach c7 through the c6 trap. Silver could place horses on both b6 and c7, but this would leave the east without a silver horse. Most players will place a minor piece behind each home trap, and if necessary use phalanxes and/or congestion to protect the back squares.
A defender might take an attacker hostage; this may turn the tables, if it gives the hostage-holder an advantage in free pieces. Framing an attacker may also be a powerful countermove, if the frame is solid and doesn't use too much strength.
Trap attack plans are thus not straightforward. Early on, attacking ideas exist in conjunction with more cautious moves such as homeward pulls. As the position sharpens, even homeward pulls often become risky; sooner or later, a trap attack will likely be necessary.
Each side's attacking potential should be considered on each turn; a trap can quickly become vulnerable, and the first one to attack a vulnerable trap will have a head start. A strong trap attack will not only create threats, but also deny the opponent a chance to create strong threats in his home trap.
If one side is continually on defense, the attacker will likely gain an upper hand. One who can't easily thwart an attack should probably counterattack, usually on the other wing. With each side attacking and defending, the position may become extremely sharp.
Gold attacked Silver's home traps, but Silver took a horse hostage and also counterattacked, creating a strong goal threat that will cost Gold material. (Game)
An attack plan must consider the opponent's alignment. An attacking piece might be taken hostage, but the attacker should try to ensure that any such hostage would be weak. While attacking, one should remain mindful of home defense; a strong attack would be no good if the opponent got an even stronger counterattack.
An opening attack often involves a horse and camel, which together might eventually control an away trap even without their elephant, or might create a double-threat on the wing. If the gold and silver camels are on the same wing, this may not work, as a horse would rather advance on the other wing. When one wing is gridlocked, the game will likely be decided on the other wing.
A trap attack may have to be abandoned or suspended, especially if the opponent gets a strong attack of his own. A non-elephant might stay in enemy territory and perhaps keep shared trap control while the elephant goes elsewhere to fight a counterattack.