A control apparatus for an internal combustion engine includes a variable
compression ratio mechanism capable of varying a compression ratio of the
engine, a compression ratio setting section that sets a compression ratio
to be attained by the variable compression ratio mechanism in accordance
with an operating condition of the engine, a knock detecting section that
detects a knock occurrence state, an ignition timing learning correcting
section that determines a learning correction value of an ignition timing
in accordance with the knock occurrence sate, and a compression ratio
correcting section that corrects the compression ratio set by the
compression ratio setting section in accordance with the learning
correction value of the ignition timing. A control method is also
provided.