0 Favourites

How do I Fix this Recursion (Minimax Algorithm)

  • I'm trying to build a board game 3x3 (like the last man standing) with AI. When I'm building the algoritm, there is a little problem with some condition. Like the image below.

    i just want to run "Terpilih = -1000" one time only, but its keep running and never done the "Else" events.

    For more detail check this

    [attachment=0:3r8hij83][/attachment:3r8hij83]

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Else events only triggered when the last event is NOT triggered, so if it always triggered the last event, of course the else event won't be triggered. Have you tried to look at the debugger and see if the Terpilih variable actually change value when you want it to change? Have you tried the "System > Trigger once while true" condition? (it supposed to make sure the event only triggered once, and only triggered again after the statement becomes false, because of a change of a variable's value for example)

    ps: fellow Indonesian here. (Ini buat tugas akhir ya? Eventnya sudah cukup rumit jadi susah bantu cari penyebab errornya kenapa, soalnya minim komentar di kodenya.)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
175 32,631
clifton11221's avatar
clifton11221
Unread hot topic
99 10,136
karshinkoff's avatar
karshinkoff
Unread hot topic
98 7,593
norum82's avatar
norum82