Score and optimization