Japanese battle formations were instigated once the samurai army drew near to its enemy (i.e. from order of march to order of battle) and dependent on the terrain on which conflict would take place and also the expected formation the enemy would itself be in. Many formations were counters to other formations (e.g. the Keyhole and other similar formations were used to counter the Arrowhead).
In addition, the daimyo would aim to change the formation mid-battle in order to secure an advantage or to counter a move by the enemy.
Note that the terrain over which the Japanese fought was rarely a large, empty field! They fought over strategic positions like bridges, castles, mountain passes and the like. At that time Japan had few roads and much of the terrian was mountainous (or at least hilly) and heavily wooded. Most formations therefore kept the daimyo at the rear or centre of the formation with significant strength at all sides (flank, rear and vanguard) unless they knew the territory well or knew that their rear was protected.
As you can see from the above illustration, the Daimyo is centre rear. At the front, arqubusiers are densely packed to blast a hole for the troops behind (usually samurai and ashigaru yari) to burst through. However, the formation keeps a strong screen to the rear and the flanks can similarly be protected from an unexpected attack.
As such, most Japanese formations tended to be 'deeper' than 'wider' - although there were some exceptions such as Lying Dragon (used when defending a hillside)
Before moving into formation, the daimyo would typically be seated inside a maku (a semi-enclosed space) on a folding camp stool and generally communicate his orders through subordinate generals - these would then be transmitted down the chain of command.
The simplest formations were mainly based on ancient Chinese models - the simplest of all was the nanasonae (Seven Units) - three vanguard units, two flanking units, the daimyo with the main body and a rear guard. All of the formations had some elements in common - the daimyo at centre rear and a vanguard of missile troops (formed and skirmish) protected by ashigaru yari and samurai (who tended to form the flanks as well). The baggage train would be well defended.
Units would communicate using highly mobile Courier Guards - usually but not exclusively mounted.
Moving into different formations required a highly trained army and the more complex formations were prevalent more towards the latter stages of the Sengoku period (as professional ashigaru rather than levy peasants were employed).
The hachijin - the 8 most important traditional Chinese battle formations - were associated with Tang Emperor Taizong who reigned from AD626 to AD649 and were themselves probably derived from the writings of Chinese strategist Wu Zi (born around 400BC). It seems incredible that the Japanese formed their battle tactics on the writings of around 1,100 years ago (a bit like fighting WW2 based on the tactics of the Norman Conquests) - and where the main troop types (crossbowmen and chariots) were not even used. However, early Japanese armies fought according to the writings of Sun Tzu and Takeda Shingen had a quote from the Art of War emblazoned on his battle flag.
Most battle formations became adaptations of the hachijin and so were variations of hochi, kakuyoku, gyorin, engetsu, choda, hoen, koyaku and ganko) and it is these we will talk about first
1. Hoshi (arrowhead)--This was a formation for a fierce charge. A dense screen of arquebusiers headed the vanguard samurai and softened up the enemy ranks for them. This formation was made for a fierce attack so the flanks were more lightly protected. The formation literally took the form of an arrowhead - a wedge facing the enemy. It was used by the Takeda when using their famed cavalry and most famously used by Shimazu Yoshihiro who, when he realised he was surrounded at the Battle of Sekigahara, placed himself at the head of 80 men in a hoshi formation to break out.
2. Kakuyoku (crane's wing). This was a defensive arrangement which allowed for rapid deployment into an offensive movement to surround an attacking enemy. The vanguard absorbed the enemy advance using missile weapons and skirmishers while the main strength (the outstretched and reverse-curved 'wings') spread out to envelope the enemy. It was used by Takeda Shingen at the 4th Battle of Kawanakajima in 1561 to receive what he thought was the fleeing Uesegi army.
3. Gyorin (fish scales). This would be adopted if your army was outnumbered. It was essentially a blunted hoshi - a less risky version for an army that couldn't risk everything in a rapid charge. A strong centre is supplemented by overlapping units but there was more ability to protect the flanks.
4. Engetsu (crescent moon). This was a highly defensive formation named for the assymetric shape the troops form around their general. This was the ideal formation for a last stand - but also if attacked with a gyorin formation.
5. Choda (long snake). Although the name implies a long, thin formation it was actually quite wide so an enemy advance against either flank can be held in check. The middle troops (behind the front line) provide support to either front or rear. Meanwhile the vanguard is held centrally to break out into an attack. It was a great counter to an enveloping kakuyoku.
6. Hoen (a square and a circle) aka Saku (keyhole). The best formation for countering a hoshi attack. Six ranks of arquebusiers and 2 of bows angled to receive the hoshi attack.The troops in the centre formed a square and circle (the keyhole shape) - best shaped to absorb the charge proper.
7. Koyaku (yoke). Named after the wooden yoke (kubiki) used on an ox cart this was considered a good defense against most attacks - especially the "cranes wing" and "arrowhead" attacks. The vanguard would hold the enemy long enough to know their intentions. The commander could then react with the most suitable formation. As such it provided strength at the vanguard but also flexibility to adapt.
8. Ganko (birds in flight). This was a very flexible and deep arrangement of troops that could be changed as the situation developed. Arquebuses screened the front and rear, but, could move if needed to a flank if the enemy altered their attack. The arrangement of many ranks deep could absorb a fierce charge (as happened at the Battle of Anegawa in 1570). Essentially a defensive formation but as an attacking model it worked well against a keyhole.
Many more formations were added later and appeared sporadically during the Sengoku period. Some are only described in text so guessing the actual formation itself is not easy.
9. Koto (tiger's tail - or more specifically treading on a tigers' tail. The formation takes its name from a poem about being very daring and was seen as a good defensive formation when facing an enemy of equal strength. It was a deep formation which provided flexibility as well.
10. Garyo (reclining dragon). The formation to adopt when defending a hillside. The divisions are able to move easily to new positions when there is a need to change formation. Skirmishing troops were deep to the front and all round protection was provided.
11. Taimo (great gamble). This was used to assess the enemy strength on the flanks. Once the weakness was found, the centre force is used to penetrate it. Again, considerable skirmish firepower was at the front and the forces were arrayed to rush into any gap that formed.
12. Koran (dancing tiger). The formation to adopt if your army is about to be attacked on both flanks. The leading division strikes the enemy's 'head' then the rear divisions move to take the enemy in the rear. Bows and arquebuses formed the head of the tiger (with support) and other divisions would move out and around as the tigers head withdrew.
13. Kenran (dancing sword). Similar to koran but with greater strength to the rear, increasing its defensive value for a general that fears attacks from all sides.
14. Shogi-gashira (captain of chess). The formation for pursuing a retreating or retiring enemy. The central units form a shape similar to the playing pieces in shogi (Japanese chess) and advance upon the enemy. Meanwhile the flanks, middle and rear press forward and expand left and right to allow an envelopment.
15. Matsukawa (bark of the pine tree). An unusual formation as it places cavalry, missile troops and spears in the middle of the formation (cavalry on the outside with foot samurai behind them. The main benefit was greater mobility and protection from all sides. The cavalry could easily wheel to vanguard or rear - but by keeping the shooting troops inside it meant that this was vulnerable to shooting.
16, Kuruma gakari (winding wheel). This formation formed in a circle. While moving on the enemy it maintained this composure. When the point of attack was decided units were detached from the circle. Once the unit grew weary, another would be rotated in its place. Fresh units would continue to be sent upon the target until a breakthrough was achieved. This Formation was used by Uesugi Kenshin to counter Shingen's "cranes wing" at Fourth Kawanakajima. It is an idealised representation of a tactical move that replaces tired units with fresh ones without breaking momentum.
17. Wachigai (interlaced circles). The formation takes its name from the shape presented by the front and rear of the formation. It was apparently of most use when outnumbered and fighting in woodland.
18. Sei ganko choku (variation on ganko). Representing an elaborate ganko, it combined depth and flexibility. Arquebusiers were found in more strength to the centre and rear and samurai and yari ashigaru spaced to adapt to an attack from any side.
19. Betsute naoshi (different direction). Recommended for one's reserve troops if the enemy is drawing near - especially in the case of a disadvantage in height (i.e. the enemy is above you). There is a considerable defensive element - especially around the daimyo / general.
20. Ryukei (flowing current). Used in a fighting retreat, the inclined flanking units provided excellent cover from enemy harassment.
21. Unryo (cloud dragon). Adopted when the enemy had the advantage in terrain (such as steep or difficult places) but not in numbers.
22. Hicho (flying bird). Similar to unryo in appearance but adopted when the enemy has the advantage in terrain AND numbers.
The following formations have no diagrams as guidance so their shape and size (and the units used) can only be guessed at.
23. Suki no seki (vanguard's plough). A combination of gyorin and kakuyoku - therefore essentially defensive.
24. Choun (cloud of birds). Described as being like the gathering and dispersal of birds or the changing appearance of clouds when an army takes position on a hill. A defensive formation which suggests quick movement by units (hence adapatability)
25. Kanchi (sink into the ground). Essentially a defensive formation where the troops provided mutual protection. Used by a unit at the battle of Hibikino which thereby avoided certain death.
26. Hidaka (high sun). Adopted when a large Korean army cut the road along which the Mori clan were travelling. Has to be assumed as being an attacking formation and one that was effective against a static defence.
27. Hyori (principle of law). Used at the battle of Aoino.
28. Ryu (dragon).
29. Ryu no maru (dragon in a circle). Sounds like a variation of engetsu (or possibly karuma gakari) and appears in an account of the 4th battle of Kawanakajima. The Takeda surprise attack force arrived at the summit of Saijosan. The Uesegi position was deserted and they could hear the sound of battle coming from the plain in the north. The attack force therefore rushed down the paths to support the main body but Uesegi Kenshin had left a body of 1,000 troops to guard the river crossing in the ryu no maru formation. The Takeda did eventually with through but at a high cost. Assume it is a defensive position for a narrow area.
30. Hangetsu (3 day old moon). Used at the battle of Konodai. Similar to engetsu as it is used specifically to neutralise a hoshi attack.
31. Minotenari (winnowing fan). Defensive formation enhanced with bamboo bundles which provides a protective screen for arquebusiers.
Despite the samurai being well drilled, we cannot expect armies to easily move from one of the formations to another of the 31 easily (if at all). Some of the shapes of formations were radically different and there is a risk in moving troops when an enemy is close (or in actual contact). Some movements were more important than others and so better rehearsed. Formations whose style and constitution (such as ganko and unryo) would be relatively easy to do. Going from a kakuyoku to a hoshi would be much more difficult (impossible if in contact with the enemy) but not beyond the remit of a well drilled army and a good commander.