#๐Ÿ”’ negamax function returning column 0 all the time

31 messages ยท Page 1 of 1 (latest)

balmy groveBOT
#

@grand sentinel

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

#

:incoming_envelope: :ok_hand: applied timeout to @grand sentinel until <t:1714504702:f> (10 minutes) (reason: emoji spam - sent 42 emojis).

The <@&831776746206265384> have been alerted for review.

random forge
#

!unmute 566653183774949395

balmy groveBOT
#

:incoming_envelope: :ok_hand: pardoned infraction timeout for @grand sentinel.

random forge
#

Maybe just a screenshot instead of emojis

grand sentinel
#

yes it is, okay

#

ay i got the formatting right:

              ๐ŸŸก๐ŸŸก๐Ÿ”ด
  ๐Ÿ”ด      ๐Ÿ”ด๐Ÿ”ด๐ŸŸก
  ๐ŸŸก      ๐Ÿ”ด๐Ÿ”ด๐ŸŸก
grand sentinel
#

oh wait you dmed me it

#

code: https://paste.pythondiscord.com/7SCA

i made a negamax function for connect 4. the position im testing it on is this...

              ๐ŸŸก๐ŸŸก๐Ÿ”ด
  ๐Ÿ”ด      ๐Ÿ”ด๐Ÿ”ด๐ŸŸก
  ๐ŸŸก      ๐Ÿ”ด๐Ÿ”ด๐ŸŸก

...where you can clearly tell that column 0 (the first column because its zero-indexed) isn't the best move because yellow has various good moves like playing in the 4th column and then in the 2nd column where if that happens, it's entirely over for red. or they can play 4th column and 5th column, creating two threats which is also very powerful.

i dont get how this doesnt work, and im also quite new to this sort of thing.

(im following this guide)

grand sentinel
random forge
amber dust
#

Do you need help?

#

Which part is it exactly?

grand sentinel
grand sentinel
#

that actually makes sense

amber dust
#

How can I help you?

grand sentinel
#

read my code? try it? tinker with it?

grand sentinel
#

so did you get anything?

low sun
#

ya whats the issue

grand sentinel
#

well thats new

low sun
#

i cant process recursion

grand sentinel
grand sentinel
#

this help post is done for

balmy groveBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.