Put the chestnuts in water. Only use the ones that sink to the bottom. (The ones that float have been gotten to by insects.) Leave the chestnuts to soak overnight (or, cover with boiling water and soak for 2 to 3 hours). This makes the outer shell easier to peel.
Peel off the outer shell taking care not to damage the inner skin. (If you damage the inner skin, it will come off while the chestnuts are being cooked.) Put the peeled chestnuts in water. Measure the peeled chestnuts before they are cooled (to figure out the amount of sugar to add).
Put the chestnuts and 1 tablespoon of baking soda (bicarbonate of soda) in a pan (based on 1kg of chestnuts. If you have more or less, adjust the amount of baking soda). Add enough water to cover the chestnuts. Heat over medium heat.
When it comes to a boil turn the heat down to low (don't let it come to a rolling boil) and simmer for 10 minutes. Throw out the water, run cold water into the pan (don't make the water stream too strong) and rinse the chestnuts. (The photo shows the chestnuts being cooked. It looks like a witch's magic brew....)
Repeat Steps 3 and 4 three times. Please change the water carefully, or the skins will become damaged and the chestnuts will fall apart.
Take the thick fibers off the inner skins (most of it should be gone after Step 5). Rub off any remaining thick fibers or inner skins by rubbing the chestnuts gently with your fingers.
Put the chestnuts in a pan again with water to cover over medium heat. Turn the heat down to low when it comes to a boil, cook for 10 minutes or so and throw out the water. Repeat this until the chestnuts are no longer tannic. (About 3 times.)
Add enough water to cover the chestnuts and half the sugar, and start cooking over medium heat. When it comes to a boil turn the heat down to low. Add the rest of the sugar in several batches, and simmer until the chestnuts are cooked to the texture you like.
Add brandy (1 tablespoon to every 1 kg of chestnuts) and simmer lightly. Turn off the heat. Leave as-is overnight to let the flavors permeate the chestnuts. Done.