Right, although I didn't mean castling into check. I meant tempting a greedy algorithm by throwing away a high value piece (which was always a weakness of early chess machines), although I realize the tree search would spot that.
Also now that I'm awake, read the article fully now.
The author touched this a little bit with adding the position adjustments
> my castle is worth zero to me if I'm throwing it so I can get you in check.
I know what you mean, but castling into or through check isn't a legal move and shouldn't show up in your list of possible moves.