We construct a graph-valued analogue of the Homflypt sl(3) invariant for virtual knots. The restriction of this invariant for classical knots coincides with the usual Homflypt sl(3) invariant, and for virtual knots and graphs it provides new information that allows one to prove minimality theorems and to construct new invariants for free knots. A novel feature of this approach is that some knots are of sufficient complexity that they evaluate themselves in the sense that the invariant is the knot itself seen as a combinatorial structure.Mathematics Subject Classification (2010). 57M25.