Nemo_Tenetur, you 're right. A double aldol reaction on the acetone, followed by water elimination should give (CH3)2C=CH-CO-CH=C(CH3)2. Then a michael addition whith NH3 (followed by the same intramolecular reaction) should cyclizise the compound.
OK, this may be a little off-topic, but I know in literature there is described a mannich reaction between 3,5-(dicarboxymethyl)-4-heptanone, formaldehyde & methylamine to yield N-methyl-3,5-(diethyl)-3,5-(dicarboxymethyl)-4-piperidone (cfr. Chem. Ber. (1936) vol 69 p 2299). When this reaction is done with 2,4-(dicarboxymethyl)-3-pentanone, followed by decarboxylation, one obtains N-methyl-3,5-(dimethyl)-4-piperidone.