アルゴリズムの集合を定義し、各アルゴリズムをカプセル化して、それらを交換可能にする。 Strategy パターンを利用することで、アルゴリズムを、それを利用するクライアントからは独立に変更することができるようになる。

p.339 「6. Strategy クラスと Context クラス間の通信に関するオーバーヘッド。... このことから、いくつかの ConcreteStrategy クラスが、このインタフェースを通して送られるすべての情報を利用しないことは十分にありうる。... もしこれが問題ならば、Strategy クラスと Context クラスの間により密な結合が必要になる。」
p.318, line.17-23, 6.Communication overhead between Strategy and Context. The Strategy interface is shared by all Concrete Strategy classes whether the algorithms they implement are trivial or complex. Hence, it's likely that some ConcreteStrategies won't use all the information passed to them through this interface; simple ConcreteStrategies may use none of it. That means there will be times when the context creates and initializes parameters that never get used. If this is an issue, then you'll need tighter coupling between Strategy and Context.
p.339 「1. Strategy クラスと Context クラスのインタフェースの定義。 Strategy クラスと Context クラスのインタフェースは、 Context オブジェクトのどのようなデータに対しても、 ConcreteStrategy オブジェクトが効果的にアクセスできるようにしなければならない。... 特定のアルゴリズムの必要性やそれに対するデータ要求に応じて最善の方法を選ぶことになる。」
p.319, line.5-19, 1.Defining the Strategy and Context interfaces. The Strategy and Context interfaces must give a ConcreteStrategy efficient access to any data it needs form a context, and vice versa. One approach is to have Context pass data in parameters to Strategy operations--in other words, take the data to the strategy. This keeps Strategy and Context decoupled. On the other hand, Context might pass data the Strategy doesn't need. Another technique has a context pass itself as an argument and the strategy requests data from the context explicitly. Alternatively, the strategy can store a reference to its context, eliminating the need to pass anything at all. Either way, the strategy can request exactly what it needs. But now Context must define a more elaborate interface to its data, which couples Strategy and Context more closely. The needs of the particular algorithm and its data requirements will determine the best technique.
個々の ConcreteStrategy が存在しない時点で、最善の結合を設計するのは難しい。このため、オーバヘッドが大きくなりがちである。
差分により、結合のインタフェースを必要に応じて増強する。つまり(最善の)インタフェースを選ぶタイミングを遅らせることができる。
Strategy に差分で抽象メソッドを追加できることにより、 Context から Strategy へ渡す情報を後から増やすことができる。ただし、オブジェクト毎にインタフェースを選べるわけではなく、システムに必要なもっとも密な結合になる。
xxx
p.340 「2. テンプレートパラメータとしての Strategy クラス」
p.319, line.20, 2.Strategies as template parameters. In C++ templates can be used to configure a class with a strategy. This technique is only applicable if (1) the Strategy can be selected at compile-time, (2) it does not have to be changed at run-time.
一つのシステムで一種類の ConcreteStrategy しか必要ない場合、 Context と ConcreteStrategy を別のオブジェクトにすることは不必要な複雑さを導入することになる。
Context への差分として ConcreteStrategy に相当する実装を行なう。
Strategy, ConcreteStrategy が必要なくなり、クラス数が減る。
xxx