Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Minimax algorithm
Post: RE: Minimax algorithm

Okay but if I wanted to ease the algorithm, for instance if I would like to win in max 3-4 moves, could I just reduce the depth? Let's say I put depth = 10.
freethrownucleus Game Development 3 2,035 May-29-2023, 06:56 PM
    Thread: Minimax algorithm
Post: Minimax algorithm

Is there anyway I can make my minimax algorithm stronger? (For a tic-tac-toe game.) def minimax(mark, square, alpha=-1000, beta=1000, depth=0): """minimax algorithm with alpha/beta pr...
freethrownucleus Game Development 3 2,035 May-24-2023, 05:12 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

How can I easily to change the code so the game doesn't stop after making the winning combination. But what I want to make is next: -> the winner is a player who scores the winning combinations o...
freethrownucleus Game Development 26 5,110 May-05-2023, 10:23 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Alright thanks! **cool**
freethrownucleus Game Development 26 5,110 May-05-2023, 04:24 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Yes I agree with you. But if you saw my last reply, I'd rather stick to pygame than tkinter. I managed to make a cross shaped pattern by using pygame if you saw last reply. I gave up trying to combi...
freethrownucleus Game Development 26 5,110 May-03-2023, 09:30 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

How can I set a counter for a number of wins? (Probably two different counters.) If I win, my number of wins increases. If computer wins, its number of wins increases. Also, following the counters o...
freethrownucleus Game Development 26 5,110 May-03-2023, 04:40 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

And this is the code with the shape that I want to use in the code beyond with the exact idea I had for the 3d-cube (setting the winning combinations for one board): import tkinter as tk class Squa...
freethrownucleus Game Development 26 5,110 Apr-29-2023, 01:33 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Yes makes sense. I got your point. But can I somehow change this 3d-cube into a net of a cube by some slight changes in this code that uses pygame? I managed to make a net of a cube that I wanted wit...
freethrownucleus Game Development 26 5,110 Apr-29-2023, 01:30 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Yes I tried to adapt this line, but as you said, it doesn't really matter. But if I only have winning combinations over one of the six boards, could I somehow implement my minimax algorithm (class R...
freethrownucleus Game Development 26 5,110 Apr-28-2023, 05:36 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

I want to change this 2-player game into a game against computer. I tried to implement this minimax algorithm that's in the first class in my code but I can't make it work. I tried a couple of options...
freethrownucleus Game Development 26 5,110 Apr-27-2023, 10:51 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Thank you!
freethrownucleus Game Development 26 5,110 Apr-27-2023, 10:47 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

How exactly should I use images? Because if you see the start of this thread, I tried to load images for boards and it didn't go well ...
freethrownucleus Game Development 26 5,110 Mar-28-2023, 01:54 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Okay, great, but what if I want, let's say, to combine 3 or 4 in a row for a win? 3 in a row on one board or 4 in a row on combining 2 or more boards? That's why I had an idea to write all the combos ...
freethrownucleus Game Development 26 5,110 Mar-28-2023, 10:42 AM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

I don't know if you understand me well, sorry. This is what I meant by combining more boards (2 or even more) for winning combinations: https://mega.nz/file/uJw0VBRR#vbKjX5l_cK...2Nso9H2rlM . That's...
freethrownucleus Game Development 26 5,110 Mar-27-2023, 11:07 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

No, I don't expect anyone to write the whole code ... I just ask what I have problem with or don't understand. I don't get exactly what you did with the new code. I think I managed to modify your fi...
freethrownucleus Game Development 26 5,110 Mar-27-2023, 08:52 PM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Nice game but you didn't understand me well. I need this shape for my game. Something like a cross of 6 squares and each square contains a tic-tac-toe board: https://mega.nz/file/zNgRlRoJ#vXbnAswpwA.....
freethrownucleus Game Development 26 5,110 Mar-26-2023, 10:33 AM
    Thread: Drawing a net of a cube
Post: RE: Drawing a net of a cube

Yes, I need to have 6 boards with 9 places (in general 54 places). Hmm, maybe it would be easier and better with tkinter but I think I would have the same problem if I used tkinter. I would only know ...
freethrownucleus Game Development 26 5,110 Mar-25-2023, 04:40 PM
    Thread: Drawing a net of a cube
Post: Drawing a net of a cube

I need to draw a net of a cube. Each of squares of a cube will present a tic-tac-toe board. I tried this but I can do nothing with it (making anything more than a drawing). If anyone could help ... ...
freethrownucleus Game Development 26 5,110 Mar-25-2023, 02:14 PM
    Thread: Dictionary
Post: RE: Dictionary

Thanks! **smile**
freethrownucleus General Coding Help 3 76,869 Mar-22-2023, 08:02 PM
    Thread: Dictionary
Post: Dictionary

How can I get just numbers as int or float type from this dictionary named brand? brand: {'BMW': 1983, 'Audi': 1986, 'Opel': 1992}
freethrownucleus General Coding Help 3 76,869 Mar-22-2023, 05:24 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020