This is fun! But, the first few told me "this is the optimal solution", then I hit the xor gate, and I can get either "this uses the fewest nand gates but it can be done with fewer components" or "this uses the fewest components, but it can be done with fewer nand gates".. Does this imply that there is no optimal solution, or just that I've not yet found it?
You haven't yet found the optimal solution. I had the same problem and it wasn't until a later problem that I realised XOR could be implemented with fewer nands.