This tag apparently is used as a synonym for "minimax", which seems more appropriate and is better maintained; I would suggest introduction of a tag synonym.
Questions tagged [minmax]
272 questions
-1
votes
1 answer
How to apply min max algorithm to a hex game
How to design a efficient algorithm for hex game using min max algorithm since its branching factor is too high.
Normal tic tac toe game be made using simple min max algorithm but in this case for a 11*11 board game we have 121 combinations so for…

Jatin Rao
- 13
- 4
-1
votes
1 answer
Minmax tic-tac-toe
I'm trying to use the minmax algorithm for a game of tic-tac-toe.
This is the code I'm working with for getting the best AI move in the game.
def get_best_move(board, next_player, depth = 0, best_score = {})
return 0 if tie(board)
return -1…

Mahler7
- 27
- 5
-1
votes
1 answer
values are not transforming in datagridview as per condition c#
I want to change the value of datagridview column according to the condition if the cell.value is minimum of the all values the cell must contain "L" , that is low. If the value is highest of all the cell.value = "H" rest should be medium. This is…

sarim
- 1
- 2
-1
votes
1 answer
Minmax tic-tac-toe algorithm that never loses
I'm trying to build a min-max algorithm for a Tic-Tac-Toe that never lose...
I try to build it from reading few sources: …

Yang
- 1
- 5
-1
votes
3 answers
How to establish a min max value, from a char array to same char array for output
Here's my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication7
{
class Program
{
#region//Main() Put everything thats finished in…
-1
votes
1 answer
Java Connect 4 MinMax Algorithm
EDIT: I don't know why somebody links me a TicTacToe as duplicate for my question, there isn't even a MinMax-Algorithm in it.
Currently i'm working on a Connect4 game against the computer which should use the MinMax-Algorithm.
Before that, we wrote…

Max Kirsch
- 441
- 5
- 24
-1
votes
1 answer
what's the difference between *iter.first and iter->first?
vector a = { 1,2,3,4,5,6,7 };
pair, vector::iterator> pair_of_itr; //not working showing wrong directional error!
auto pair_of_itr = minmax_element(a.begin(), a.end());
cout << *pair_of_itr.first << " " <<…

shivam gohel
- 1
- 1
-1
votes
1 answer
error Undefined function or method 'min' for input arguments of type 'struct'
I have matrix 3x108 which contains dimension data. I want to find min and max value of my matriks in each row. Here's my code:
P = load('grading/dimension.mat');
min_P = min(P,[],3);
max_P = max(P,[],3);
but it gives me error:
??? Error while…

M.luth
- 11
- 3
-1
votes
2 answers
How to find minimum and maximum among a list of integers in Python without using built-in functions from console
In the following code, I am unable to accept the input list values from console.
s=[]
for i in range(10):
s[i]=int(input('enter integers from 1 to 10\n'))
mini=11
for temp in s:
if mini>temp:
mini=temp
print('minimum :…

Vikranth Inti
- 111
- 1
- 2
- 8
-1
votes
2 answers
Generate list of possible moves Python Tic-Tac-Toe
I am currently working on a project for one of my classes where I have to implement an AI opponent to play tic-tac-toe using minmax and Alpha-Beta minmax algorithms to determine the moves.
The problem I am having however is attempting to generate a…

OmegaTwig
- 243
- 1
- 4
- 15
-1
votes
1 answer
Delphi minmax HashTable debug - closed
Solved ,stuid bug
function Tform1.Boardtostr(const aboard:Tboard):string;
var a,b:integer;
begin
result:='';
for a:= 1 to 8 do
begin
for b:=1 to 8 do
begin
if board[b][a] = -1 then //<--should be aboard instead of board
…

user1444684
- 19
- 2
-2
votes
3 answers
how to normalize test and train data as both having different different number of rows
I have a dataframe d and one of the columns is price (Numerical) having 109248 rows. I divided the data into two parts d_train and d_test. d_train has 73196 values and d_test has 36052 values. Now to normalize d_train['price'] and d_test['price'] i…
-2
votes
1 answer
Mancala AI completes the game and wins in one round instead of playing one turn
I'm working on a Mancala game where players get to play against an AI. the code is complete, the Mancala game functionality is found within the Mancala_helpers, the AI algorithm is a MinMax tree and is found in the MinMax file, and finally the game…

yehyafarhat
- 3
- 4
-2
votes
1 answer
How to properly update Dictionary without having problems with reference?
I am trying to write AI for computer player using MinMax in checkers game and i have strange problem.
I have that dictionary:
Dictionary gameBoard;
Look at the methods ApplyMove() and RevertMove()
public int MinMax(Dictionary

Brarord
- 611
- 5
- 18
-2
votes
1 answer
Why I am always getting 0 as the minimum of an array
Below is my code for finding the minimum and maximum value from an array. Can anyone explain why I am getting 0 as the output for minimum element? What can be the reason behind it?
I am getting the maximum value among the elements of array as…