I'm not going to go into depth about the correct size, distribution and correct anode material for your yacht. The correct choice will depend on the hull material, salinity of water, berth location and quantity of submerged metallic equipment. There's already plenty of information out there and I would recommend the website of MGDuff for the best guidance: http://MGDuff Catalogue
This article gives an example of a recent problem of a 5-month old steel widebeam canal boat that was fitted from new with the wrong anode material. According to MGDuff: Use Zinc anodes in salt water, Aluminium anodes in salt & brackish water and Magnesium anodes in fresh water.
The two following images were taken of a five-month old steel widebeam canal boat. From new she was launched into the brackish water of a coastal marina. Within the five month period, all of her Magnesium anodes had been consumed. As well as being the wrong material for brackish water, there were only four anodes for the entire vessel. Of primary concern was the condition of the hull paint. In the regions of the Magnesium anodes, the paint coatings had disappeared. The surfaces nearest to the anodes were bright, bare steel. As the distance from the anodes increased, the level of missing paint decreased. The missing paint around the Magnesium anodes occurs due to the caustic salts that build up in the surrounding water. These caustic salts are a by-product of the electrolytic decomposition of the over-reactive Magnesium. Note that in most areas, the exposed plating was shiny, bright and free of significant corrosion and free of pitting. This lack of corrosion could be attributed to the protection given by the anodes, but now that these were wasted, there was no longer any paint or anodes to protect the steel.
In the image above, the conical-shaped object on the end of the red wire is an Aluminium hanging anode, installed by Fieldhouse Yacht Surveys as a temporary measure, to protect the bare metal until new Aluminium anodes could be fitted and the paint repaired.
The advice from Fieldhouse Yacht Surveys regarding the correct anode material was to replace all Magnesium anodes with Aluminium ones and to increase the quantity of anodes from two per side to five per side (ten hull anodes in total). Recommendations for the temporary application of paint were made, with a more thorough treatment in the Spring, when weather conditions were more suitable.
The steel widebeam canal boat was lifted yesterday in order for the paint to be applied under the right conditions. The following images show that in the intervening 5 months, almost no paint has been removed from the hull. This means that the anodes haven't created any caustic by-products that would remove the paint. Additionally, the Aluminium anodes have decayed to some extent, which shows that they are doing their job. I would be concerned if the anodes were free of decay. In brackish water, Zinc anodes of form a layer of Zinc Hydroxide on their surface. This indicates that they are not active enough, plus the coating of hydroxide salt reduces the effectiveness of the Zinc.