In [CES02], a cocycle invariant using twisted quandle cohomology theory was defined. Let be a quandle, and be an Alexander quandle with a variable (typically for a prime and a polynomial ). A function is called a twisted quandle -cocycle if it satisfies the twisted -cocycle condition
Let be an oriented knot diagram with orientation normal vectors. The underlying projection of the diagram divides the -space into regions. For a crossing , let be the source region (i.e., a unique region among four regions adjacent to such that all normal vectors of arcs near point from to other regions). Take an oriented arc from the region at infinity to a given region such that intersects the arcs (missing crossing points) of the diagram transversely in finitely many points. The Alexander numbering of a region is the number of such intersections counted with signs. If the orientation of agrees with the normal vector of the arc where intersects, then the intersection is positive (counted as ), otherwise negative (counted as ). The Alexander numbering of a crossing is defined to be where is the source region of .
For a coloring of a diagram od a classical knot by , the twisted Boltzmann weight at is defined by where is a twisted -cocycle, and is the sign of the crossing . This is in multiplicative notation, so that the action of on is written by . The colors assigned near are chosen in the same manner as in the ordinary -cocycle invariant (source colors, or ordered pair of colors at ) and is the Alexander numbering of . The twisted quandle -cocycle invariant is the state-sum