In a "problem of a week" contest in my school, I gave the following problem to students: we assign to each vertex of a cube a number $1$ or $-1$. And we associate to each face the product of the numbers on its vertices. Is it possible to assign numbers to vertices in such a way that the sum of ALL numbers (vertices+faces) is $0$?
It is possible to answer checking all of the $2^8=256$ possibilities but of course many students came up with the solution using an invariant of the configurations: changing one vertex from $1$ to $-1$ (or vice versa) changes the sum of a multiple of $4$ (due to the fact that a cube is a simple polytope of dimension $3$). Since if all numbers are $1$, the sum is $14$, the sum is congruent to $2$ mod $14$, so it cannot be $0$.
My question: Have this kind of "labeled polytopes" been studied before? Maybe with a generalized construction as associating the product of vertex labels to any "intermediate" faces (edges in the case of a polytope). Is the sum, or any polynomial of the vertex labels, a known and useful invariant in the study of abstract polytopes?