Put walls in all empty spaces according to the following rules:
1) the number of walls connecting the pillar must match the number written on the pillar.
2) the walls must not form closed loop.
The walls working on a diagonal, therefore:
If a pillar has zero on it, walls must be formed on either side, but not touching the pillar.
If there is a 4, all the walls must be touching.
You are trying to create a large castle with no solid loop, there must always be an opening. This is similar to the loop found in logic books, but with a twist.