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.

272 questions
2
votes
1 answer

How to fix the min max algorithm if it tends to self-destruct?

I am trying to write AI algorithm using MinMax to checkers game. Everything was fine before final test... The computer chooses any piece and after that he is coming to my guys. He really wants to die fast. Here is my code: public MoveAndPoints…
Brarord
  • 611
  • 5
  • 18
2
votes
1 answer

MinMax transformation on dataframe using Scala

I have a DataFrame of numerical features that I need to standarize. To do so I am using python MinMaxScaler to perform the following operations on all columns of the DataFrame: X = (X - X.min(axis=0)) / (X.max(axis=0) - X.min(axis=0)) Now I am…
user3284804
  • 121
  • 2
2
votes
0 answers

Interpreting Min-Max Scaled Regression Coefficients

Hi I am running a linear regression i.e. y on x. both variables are in units. I have scaled both variables between 0 and 1. In other words Min-Max scaling is applied on y and x. I am getting a significant coefficient value of 0.5. The question is…
Gibz
  • 21
  • 2
2
votes
2 answers

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; grid-template-rows: minmax(min-content, 45px) 1fr…
John Balvin Arias
  • 2,632
  • 3
  • 26
  • 41
2
votes
1 answer

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'; min(8); Field[bestCol][bestRow]='X'; in…
user9240647
2
votes
3 answers

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 it covers all information about all 5 players. I…
evilgenious448
  • 518
  • 2
  • 11
2
votes
2 answers

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 doesn't feel right. My question is , is that a…
Naoum Mandrelas
  • 258
  • 3
  • 20
2
votes
1 answer

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've built some patterns which will be good for the…
rpiman
  • 21
  • 2
2
votes
1 answer

MinMax algorithm not working as expected

I'm building a the tic tac toe game (a project on Free Code Camp), and have implemented a minmax algorithm to decide which square the computer player should choose next. It is working as expected in all cases I have tested, except for the…
Geoff Wright
  • 188
  • 10
2
votes
2 answers

SQL LISTAGG Min and Max Function Issue

Need to find min and max date inside of list tag Like this in one column Min Date:01/01/2015 / Max Date:01/05/2015 SELECT D.ITEM_ID AS "ItemId", C.NAME AS "ItemName", D.UOM_ID AS "UomId", B.DESCRIPTION AS "Uom", …
Beez
  • 61
  • 4
  • 13
2
votes
1 answer

Tree Implementation in MinMax with Alpha-Beta Pruning

I want to implement an AI (Artificial Intelligence) for a checkers-like game I have written the follow methods: -the method public List allMoves(){ ... } that returns me the list of all valid moves sorted by weight, where the…
AndreaF
  • 11,975
  • 27
  • 102
  • 168
2
votes
3 answers

Min-max python v3 implementation

I'm currently trying to code an equivalent for the built-in min-max function in python, and my code return a pretty weird exception which I don't understand at all: TypeError: 'generator' object is not subscriptable, min, 7, , 9 when i try it…
jehutyy
  • 364
  • 3
  • 11
2
votes
1 answer

Finding Local Min and Local Max Between Two Values In Matrix

I have finally been able to get an Excel sheet read in and get the data plotted as needed and to get the data averaged. However, now I am having issues trying to find the local min and local max between values on the graph. I am trying to find the…
biggi_
  • 266
  • 3
  • 12
2
votes
11 answers

Min and Max of a List (without using min/max function)

I was wondering if there is a way to find min & max of a list without using min/max functions in Python. So I wrote a small code for the same using recursion. My logic is very naive: I make two stacks (min_stack and max_stack) which keep track of…
Prakhar Mehrotra
  • 1,215
  • 4
  • 16
  • 21
1
vote
5 answers

How to set the score for a table in Tic Tac Toe?

I have table and some functions like Generate_moves() etc. but for the minmax algorithm to work I need to set a score for tables to make the computer choose the best table. public int Score() { if (Turn == "X") …
Dementor
  • 241
  • 1
  • 6
  • 12