Questions tagged [minmax]

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.

minmax
Filter by
Sorted by
Tagged with
2 votes
2 answers
6k views

Make row height adjust to dynamic content in CSS Grid

I have this code a { text-decoration: none; color: black } * { margin: 0; padding: 0; } [data-content="curso"] { display: grid; grid-template-columns: 87px 1fr 10ex; ...
John Balvin Arias's user avatar
0 votes
2 answers
54 views

MIN & MAX with a few JOINS

I'm trying to display both MIN & MAX while joining a few tables for their information. I'm getting the MIN & MAX but it's showing the wrong info for my other fields. SELECT SONG.SONG_NAME,...
Zep's user avatar
  • 1
0 votes
4 answers
2k views

Minimum of all inputs- in C

Taking a class on C, we have learned if/else statements, repetition, operators, loops, and switch. The purpose of this assignment is to have a user input 5 numbers and back output following: ...
iAm Bob's user avatar
1 vote
1 answer
246 views

Java minmax algorithm returning null move and failing to correctly undo moves

Here is the code for my minmax algorithm: private static void minmax(){ Move move = max(4, true, null); //System.out.println(move); board.makeMove(move.getFromPoint(), move.getToPoint()); ...
tony stew's user avatar
  • 105
2 votes
1 answer
181 views

Java tictactoe problems with minmax algorithm

i want to implement the MinMax algorithm for tictactoe. I have two methods min() and max() and a evaluation method, but it doesn't works. For example when i call max(9); Field[bestCol][bestRow]='O';...
user avatar
0 votes
0 answers
39 views

TicTacToe - Return values from MinMax unsaved

I'm attempting to debug some demo code from the web, so as to understand how board states are stored and minMax works. There are no issues with the accompanying HTML (omitted here for brevity). With ...
Ryan's user avatar
  • 1,362
1 vote
1 answer
3k views

Use MinMaxScaler on training data to generate std, min and max to be used on testing data

How would I use the scikit-learn MinMaxScaler to standardize every column in a pandas data-frame training data set, but use the exact same standard deviation, min/max formula on my test data set? ...
Terry's user avatar
  • 1,651
1 vote
1 answer
199 views

How does pruning help when I will have to traverse complete graph to find the terminal states?

I read about the minimax algorithm and then read about alpha beta pruning. While I am able to appreciate the idea of pruning, what I am not able to understand is that I still have to know the terminal ...
Suhail Gupta's user avatar
  • 22.8k
-1 votes
3 answers
133 views

Pointer doesn't print the value correctly

I'd like to ask why my code doesn't work I've tired many more things to no avail for some peculiar reason the program can find the minimum value of the array but cannot find the minimum value of it ...
user avatar
0 votes
1 answer
2k views

new column with max difference in R

I have a dataframe like: A 1 2 3 4 B 4 5 6 9 C 2 3 4 5 and I want to calculate the maximum difference for each row, and put it in new column: A 1 2 3 4 3 (4-1) B 4 5 6 9 3 (9-6) C 1 ...
user avatar
0 votes
1 answer
617 views

Deciding winner in an optimally played 2-player game

I came across this question. According to the question: ‘samu’ and ‘vibhu’ are playing a game where there are N integers from 1 to N lying on the table. In each turn, the player gets to pick one ...
Ankit Shubham's user avatar
1 vote
0 answers
749 views

Good Evaluation function for Game Playing Minmax Agent with Alpha Beta Pruning

I'm trying to build an AI agent for a specific zero-sum board game using alpha-beta pruning. The program will be depth limited because of certain time constraints and hence I need a good evaluation ...
Sachin Malhotra's user avatar
-1 votes
1 answer
2k views

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 ...
Jatin Rao's user avatar
3 votes
2 answers
244 views

Minimax in Javascript not working properly

As a practice project I made a Tic-Tac-Toe game on JSFiddle (because there aren't enough already, right?) and I progressed into adding an unbeatable AI. For the most part it works, but there are some ...
c-shark's user avatar
  • 89
1 vote
1 answer
292 views

How to get Start and End datetime SQL Server from table with Min Max Query, if multiple time in the same Item location

I have table in SQL Server, from GPS tracking: I Want to get start and date time like this: If I'll try with Min Max Query, the result like this: **WP_OBJECT STARTDATE ENDDATE** MEKARSARI 9/26/...
Melvinsoft's user avatar
0 votes
1 answer
173 views

Minmax JavaScript algorithm return console error Uncaught TypeError: Cannot read property 'cost' of undefined

I am working on Tic Tac Toe game, using JavaScrip. When I call the MinMax function I am getting log sequence of error. Here I am calling minmax function and the values that I assigned is OK according ...
ZiaUllahZia's user avatar
  • 1,122
0 votes
2 answers
48 views

Error with trying to find Min&max when also finding average of "n" number of user inputs

package HW2_Min_Max; import java.util.Scanner; public class HW2_Min_Max { public static void main(String[] args) { Scanner myScanner = new Scanner(System.in); System.out....
F.ochoa15's user avatar
0 votes
1 answer
458 views

how to scale data in a range of (-1, 1) exclusive, instead of inclusive

I am using python preprocessing to scale my data. I used MinMaxScaler with parameters of feature_range=(-1, 1). But this returns data in a range of [-1,1]. I need data in a range of (-1,1). How can I ...
user3104352's user avatar
  • 1,120
0 votes
1 answer
1k views

MinMax - generating game tree

I try to write a MinMax program in Java for connect-four game, but this program should also be applicable to other games. But, I encountered a problem, which I cannot pass for few days. The values for ...
Xing92's user avatar
  • 1
0 votes
1 answer
471 views

tic-tac-toe: different output while using 1d-array over 2d- array

I am trying to build tic-tac-toe AI using min max algorithm. I was referring to this post from geekforgeeks for writing my code. But strangely when I'm using 1D array instead of 2D array by modifying ...
Suneeth Lenin's user avatar
2 votes
3 answers
87 views

Calculating avarage/min/max of an array

I have a set of data for 5 people. The data goes: "#ofKeys","PreferedCrate","Round1Results","Round2Results","Round2Results" What I would like is for the data to be in some form of a 2D array so that ...
evilgenious448's user avatar
0 votes
5 answers
2k views

Find min/max datetime in datatable rows

I have a data table that contains a "CreateDate" and an "UpdateDate" columns. I am trying to find the smallest CreateDate and largest UpdateDate. It is not difficult but columns can contain NULL (or ...
NoBullMan's user avatar
  • 2,108
-1 votes
1 answer
174 views

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, ...
Mahler7's user avatar
  • 27
0 votes
1 answer
79 views

Find the Max and 4th Max element

To find the maximum and 4th Maximum of an array what is the minimum number of comparisons needed? I assume I have to use an algorithm similar to MinMax and the solution found here: Find the 2nd ...
bugdoctor9's user avatar
-2 votes
1 answer
321 views

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 ...
Parth Patel's user avatar
0 votes
0 answers
60 views

List out of range inside the function, but when done manually works

leaf=[] leaf.append([1,8]) leaf.append([5]) leaf.append([6,4,7]) leaf.append([9]) leaf.append([3,2]) leaf.append([6,10,2]) max=[] min=[] count=0 def childset_max(counter,*arg): global max if ...
Christopher Bovo's user avatar
3 votes
1 answer
3k views

How to solve DataConversion Warning with MinMax normalization

Can anybody tell me how i can remove the below warning? I want to normalize a set of integer values by min-max normalization technique but i am getting this warning and don't know how to solve it? (X ...
Shelly 's user avatar
  • 827
2 votes
2 answers
412 views

Correct implementation of Min-Max in a tree

I implemented the min-max algorithm on a tree. The algorithm I created is working as intented, returning the path in the tree that corresponds to the min and max values. But my problem is that it ...
Naoum Mandrelas's user avatar
-2 votes
1 answer
771 views

Minimax Alogrithm for TicTacToe [python]

I'm trying to implement the minimax algorithm in my tic tac toe game. I watched several videos, analysed multiple programs with minimax algorithm and I think I do know how it works now. My program is ...
g_auge19's user avatar
1 vote
2 answers
801 views

Linear programming with minimum and maximum fixed cost

I need your help in the following optimisation problem. I have a maximisation Mixed Integer linear programming problem. I would like to consider the minimum & maximum fixed fee. I've done it in ...
user7090205's user avatar
0 votes
1 answer
1k views

Deprecation Warning Python

Does anybody know how can i solve this warning in the code below? Here is the warning: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and will raise ValueError in 0.19. Reshape ...
Shelly 's user avatar
  • 827
1 vote
0 answers
185 views

C - minimax with zobrist not sending right player for the execution

I have tried to implement minimax with alpha-beta pruning and zobrist hash for an abalone game (being a beginner), before adding the hash table everything worked fine (no strange behavior and no ...
Reda Drissi's user avatar
  • 1,602
0 votes
1 answer
50 views

Seemingly impossible writing to a variable

So, I'm doing some minMax AI, and somehow during a recursive routine, a variable that is not written to is changing. I have attatched the whole code, but the issue seems to be contained within the ...
W.Hunt's user avatar
  • 31
0 votes
0 answers
80 views

minMax python RISK strategy AI

I'm trying to get an AI working for a turn-based strategy game (like RISK). I'm a little new to AI programming, but I think my issue might just be passing the wrong parameter or something, either way, ...
W.Hunt's user avatar
  • 31
1 vote
1 answer
583 views

Numpy symmetric matrix becomes asymmetric when I applied min-max scaling

I have a symmetric matrix (1877 x 1877), here is the matrix file. I try to standardize the values between 0-1. After I apply this method, the matrix is no longer symmetric. Any help is appreciated. ...
kitchenprinzessin's user avatar
0 votes
4 answers
17k views

Min and Max Loop

I am writing code for an assignment that wants me to make a program that asks the user for the amount of integers they'd like to input then it accepts each input while testing if the value is the max ...
Apotheosis's user avatar
-1 votes
1 answer
88 views

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 ...
sarim's user avatar
  • 1
0 votes
2 answers
74 views

Min-Max filter does not work when other functions are loaded

01) I have A JSON URL and I load the data into an HTML table dynamically through an external .js file. 02) I have a filter for the name (first column). (It works fine) 03) I have a multiplication ...
Datacrawler's user avatar
  • 2,846
-1 votes
1 answer
920 views

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: http://neverstopbuilding.com/minimax http://www.geeksforgeeks.org/...
Yang's user avatar
  • 1
1 vote
0 answers
158 views

what is wrong with my minmax with alpha beta pruning?

when i apply minmax only to my connect4 game it get right results untill depth 7 and when i apply pruning to increase depth it get wrong results , i need a help to kno what is wrong with my logic or ...
Ahmed Mohamed's user avatar
0 votes
1 answer
85 views

I want to know what is wrong with my minmax algorithm for connect4 game?

iam try to write min max algorithm for connect4 game but when i run this code it go in infinte loop and not return move or result, so i want a help to know what is wrong with it , i work in board of 6*...
Ahmed Mohamed's user avatar
0 votes
0 answers
242 views

Understanding the minmax algorithm of tic-tac-toe (without recursion)

I'm trying to write a minimax algorithm for a tic-tac-toe at Python. I don't need help with the code, just with the algorithm... :-) I'm trying to do it without recursion, and to understand it better ...
Yang's user avatar
  • 1
2 votes
1 answer
152 views

How to write Analysis function for Min-Max Algorithm?

I'm trying to code AI for a game somewhat similar to Tic-Tac-Toe. You can see its rules here. The min-max algorithm and analysis function I'm using can be found here The way I've tried so far: I'...
rpiman's user avatar
  • 21
3 votes
2 answers
771 views

dicom images min max pixels and locations

I'm new here. I have a number of dicom images. I need to get 4 max pixel values and their co-ordinates of all the images and automatically crop the 128 by 128 4 patches from each image keeping the ...
user2102092's user avatar
33 votes
6 answers
3k views

Is there a way to easily handle functions returning std::pairs?

C++11 has function std::minmax_element which returns a pair of values. This, however, is quite confusing to handle and read, and produces an extra, later useless variable to pollute the scope. auto ...
Adam Hunyadi's user avatar
  • 1,900
3 votes
1 answer
1k views

Game Tree Algorithms & Progressive Deepening: How to approximate an answer without reaching the leaf nodes?

I just saw this MIT lecture on Game Trees and MinMax algorithms where Alpha Beta pruning and Progressive Deepening was discussed. https://www.youtube.com/watch?v=STjW3eH0Cik So If I understand ...
Saurabh Patil's user avatar
-1 votes
3 answers
878 views

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 { #...
HiradorTheDeathLord's user avatar
7 votes
1 answer
12k views

denormalize data

I normalized data with the minimum and maximum with this R code: normalize <- function(x) { return ((x - min(x)) / (max(x) - min(x))) } mydata <- as.data.frame(lapply(mydata , normalize))...
myID33's user avatar
  • 159
0 votes
1 answer
455 views

Stack overflow error in minimax algorim

Hi so I've recently started programming in java and I've set myself a task of making an AI for a tic tac toe game I've made However the minmax algorithm is throwing a Stack Overflow error and I cant ...
Aliator's user avatar
  • 19
0 votes
2 answers
1k views

JavaScript: min & max values in very big array?

How can I easily obtain the min and max values from a very big JavaScript Array (e.g 250 thousand numbers)? I tried to use this method, but it does not work: JavaScript: min & max Array values? ...
PAPP's user avatar
  • 57