You'll notice that each ideology has four target numbers, which correspond to a point in the 4D matrix that this quiz... I guess looks for the closest point for? And if you answer the questions you'll get points added and subtracted from?
Which is pretty much what happens: https://github.com/8values/8values.github.io/blob/master/questions.js