Game AI That Knows the Rules