Actually, i've seen the AI behave pretty good when beseiging wooden walls: they'd actually back off if they started taking casualties from the towers. In the scenario that I just described above, I actually lured the whole army to the towers by putting a single town militia unit out in the field. But rather than sending one or two units to decimate the militia, they sent in the whole army... Towers had a feast...