An optical disk device in which the laser light power for writing data
onto an optical disk is optimized. Test data is written onto an optical
disk while laser light power is varied and the laser light power is
optimized based on the quality of replayed signals of the test data. The
space value of the replayed signal of the test data is detected and, when
the space value is a value which should not exist, it is judged that 3T
mark period is missing or excessively written and the laser light power
in which such a space value is obtained is removed from the candidates
for the optimum laser light power. Also, jitter and error rate of the
replayed signal are detected. Even when the jitter is at a desirable
value, if the error rate is greater than or equal to a predetermined
value, the laser light power in which such an error rate is obtained is
removed from consideration as a possible optimum laser light power.