So each node or branch represents a potential action and the leaves are end conditions?
Yes. You should search the web for the term "minimax". Since it is the basis of computer chess, there is a lot of information about it out there. The algorithm has been around since around 1950, but it is so natural that a lot of people have rediscovered it (including myself).