3
$\begingroup$

I need to write a minimax algorithm with alpha-beta pruning in limited time for the 2048 game. I know expectimax is better for this work.

Assume I wrote different heuristic functions. If I want to write an evaluation function as a linear combination of these heuristic functions, do I have to give random weights, or can I calculate the optimal weights with some optimization algorithm?

$\endgroup$
  • $\begingroup$ What do you mean by "for good enough" in "can I calculate these weights for enough good with some algorithm?"? $\endgroup$ – nbro Oct 17 '19 at 14:15
  • $\begingroup$ I meant for a linear combination like evaluation(s) = x1.f1(s) + x2.f2(s). Assume I choose x1 and x2 as 1 and 5. And with this weights my algorithm's succes chance is %50 and if I increase value of x1 algorithm's chance will increase. What if I have 20 weight? Is there a algorithm gonna find approximate weight? I heard a algorithm called CMA-ES. I'll look at it. $\endgroup$ – Mustafa Tufan Oct 17 '19 at 15:34
  • $\begingroup$ Well, take a look at this duuh. $\endgroup$ – ICCQBE Oct 17 '19 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.