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
4
votes
2 answers
MinMax trees - when Min can win in two steps
So, I have been playing around with minmax trees to create a simple computer player in a two person board game. I understand the basics of the algorithm, but there is a case that eludes my turkey infused brain ... what happens when MIN can win in…

Christian
- 471
- 4
- 6
4
votes
5 answers
Is my sorting question in ascending order a good solution?
#include
using namespace std;
int main() {
// Problem #2 Ascending Order
int num1, num2, num3, small, medium, large;
cin >> num1 >> num2 >> num3;
if(num1 <= num2 && num1 <= num3) {
small = num1;
if(num2 <= num3) {
medium…

Woyal
- 43
- 3
4
votes
2 answers
Practice interview question asks for max j-i under the condition that array[j] >= array[i]; don't understand solution
I'm reading this editorial here: https://www.geeksforgeeks.org/given-an-array-arr-find-the-maximum-j-i-such-that-arrj-arri/ and I cannot understand the explanation for how the O(n) solution works. The paragraph describing it seems to contradict the…

CryptoCommander
- 49
- 2
4
votes
4 answers
Java Stream Maximum Value From Average
I have to get the Maximum average temperature's country name.
I have used following to get the average temperatures
this.getTemperatures()
.stream()
.collect(Collectors.groupingBy(Temperature::getCountry,
…
user2578909
4
votes
3 answers
Why does `minmax` always use maximum space?
As you can see in this simple example, each grid cell always uses the maximum possible amount of space. Why does this happen, and how can I convince the grid to use less space if possible?
.testgrid {
display: grid;
grid-template-columns:…

Qwertie
- 16,354
- 20
- 105
- 148
4
votes
2 answers
How to replace my 'for' loop to find min/max by STL mimax algorithm
I have to find the min/max values (min x, min y, max x, max y) from a
vector
Here my code:
vector contour;
...
Min = Point(640, 480) ;
Max = Point(0,0) ;
for (int j=0; j<(int)contour.size(); j++)
{
if (contour[j].x <…

Andre
- 53
- 4
4
votes
0 answers
Expected performance improvement of alpha-beta pruning optimizations: tt, MTD(f)?
What is the expected performance gain of adding Transposition Tables and then MTD(f) to pure alpha beta pruning for chess?
In my pure alpha beta pruning I use the following move ordering:
principal variation (from previous iterative deepening…

PanJanek
- 6,593
- 2
- 34
- 41
4
votes
1 answer
Debugging Recursive MinMax in TicTacToe
I'm trying to get the minmax algorithm (computer AI) to work in my game of tic-tac-toe. I've been stuck on this for days. Essentially, I don't understand why the computer AI simply places it's marker ("O") in sequential order from board pieces 0-8.…

funfuntime
- 261
- 1
- 8
4
votes
1 answer
How to get slider min, max value from variable.
How to get min, max slider value from variable.
When i try to slide, the slider is set to maximum and stops working.
If i put in min and max in numbers instead it work just fine.
Here is a fiddle showing the issue:

user1418025
- 43
- 1
- 6
3
votes
3 answers
What is "minmax.h" in C++?
I've been using #include in my scripts and using min() and max() as expected. I showed this to someone and they had never seen it before, said it wasn't working for them and asked me why I wasn't including and calling…

Oscar
- 279
- 1
- 10
3
votes
1 answer
Fill area between two point-lines R
I have a tibble similar to the following one:
Offensive <- tibble(OffenseFormation = c("A","B","C"),
yardas_mean = c(3,4,5),
yardas_min = c(1,4,1),
yardas_max = c(5,4,6))
I plot the…
3
votes
2 answers
CSS Grid responsive layout with auto-fit and minmax for even number of items
What I am trying to accomplish:
There are 4 grid items. At the a widest screen size, I would like the items to be lined up in a row:
item_1 item_2 item_3 item_4
As the screen width shrinks, I would like the items to wrap to the next row like…

NewbCake
- 433
- 2
- 7
- 22
3
votes
0 answers
Trying implement min max algorithm to tic tac toe. How should I implement the recursive function?
I am trying to implement a minmax algorithm that I found in javascript to my c# tic Tac toe game. I have done my best, but in my opinion the problem seems to be in the recursive function that I have been debugging for ages. This is my first time…

Mr.Wolf
- 31
- 2
3
votes
2 answers
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 combinations (e.g. setting X into fields 5, 9, 3…

c-shark
- 89
- 10
3
votes
1 answer
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 is a column of integer values starting from 0 to…

Shelly
- 817
- 3
- 11
- 16