Questions tagged [evaluation-function]

Function used in game programming and AI to evaluate the desirability of a state or a potential future state. Not to be confused with the evaluation of functions.

What is it?

An evaluation function is a function used in game programming and AI to evaluate the desirability or the suitability of a state or a potential future state.

Related tags

  • Use for the evaluation of ordinary functions

See also:

18 questions
34
votes
1 answer

Difference between Objective and feval in xgboost

What is the difference between objective and feval in xgboost in R? I know this is something very fundamental but I am unable to exactly define them/ their purpose. Also, what is a softmax objective, while doing multi class classification?
22
votes
8 answers

How to create a good evaluation function for a game?

I write programs to play board game variants sometimes. The basic strategy is standard alpha-beta pruning or similar searches, sometimes augmented by the usual approaches to endgames or openings. I've mostly played around with chess variants, so…
11
votes
1 answer

R caret model evaluation with alternate performance metric

I'm using R's caret package to do some grid search and model evaluation. I have a custom evaluation metric that is a weighted average of absolute error. Weights are assigned at the observation level. X <- c(1,1,2,0,1) #feature 1 w <- c(1,2,2,1,1)…
ADJ
  • 4,892
  • 10
  • 50
  • 83
9
votes
1 answer

Using f-score in xgb

I'm trying use f-score from scikit-learn as evaluation metric in xgb classifier. Here is my code: clf = xgb.XGBClassifier(max_depth=8, learning_rate=0.004, n_estimators=100, silent=False, …
ValK
  • 93
  • 1
  • 1
  • 8
9
votes
3 answers

How should I design a good evaluation function for Connect 4?

I've a java implementation of "Connect 4" game (with a variable number of columns and rows) . This implementation use (according to the choice of the user) Mini-max algorithm of Mini-max with Alpha-beta pruning with a maximum depth of searching of…
dragonmnl
  • 14,578
  • 33
  • 84
  • 129
4
votes
1 answer

Custom Evaluation Function based on F1 for use in xgboost - Python API

I have written the following custom evaluation function to use with xgboost, in order to optimize F1. Umfortuantely it returns an exception when run with xgboost. The evaluation function is the following: def F1_eval(preds, labels): t =…
user8270077
  • 4,621
  • 17
  • 75
  • 140
4
votes
3 answers

Better Heuristic function for a game (AI Minimax)

There is a game that I've programmed in java. The game is simple (refer to the figure below). There are 4 birds and 1 larva. It is a 2 player game (AI vs Human). Larva can move diagonally forward AND diagonally backward Birds can ONLY move…
3
votes
1 answer

How to create an evaluation function for a TIC-TAC-TOE variant game

I'm actually working on a board game which is a variant of the TIC-TAC-TOE game. The specifics of the game are the followings : 1. The game is played on a nxn board, with n variable. 2. A player wins if he succeeds in placing k alignments the first,…
blackbishop
  • 30,945
  • 11
  • 55
  • 76
2
votes
1 answer

How can I create an evaluation function for Hijara game (game explained below)?

I have to implement an intelligent version of Hijara Game in Prolog. You can play the game and learn the rules in the following link: http://www.sapphiregames.com/online/hijara.php I will use Alpha Beta algorithm (up to certain level of the search…
George
  • 23
  • 2
2
votes
3 answers

recursive function paradox in Python.. how can it be explained?

I made a very simple function that takes a list of numbers and returns a list of numbers rounded by some digits: def rounded(lista, digits = 3): neulist = [] for i in lista: neulist.append(round(i, digits)) return…
DaniPaniz
  • 1,058
  • 2
  • 13
  • 24
1
vote
0 answers

Python Deap GP Evaluating individual causes error

I am currently experiencing an issue whenever I try to evaluate an individual using the GP portion of DEAP. I receive the following error: Traceback (most recent call last): File "ImageGP.py", line 297, in pop, logs =…
0
votes
0 answers

Heuristic function for Pylos game

Pylos is a game constituted of a 4x4 pyramid board (4x4 below a 3x3 below a 2x2 below a 1). There are two players, one with White marbles and the other with Black marbles. Each player has 15 marbles initially and takes turns placing a marble on the…
0
votes
1 answer

How does tweedie nloglike in XGBoost relate to the actual nloglike?

When viewing the code for how XGBoost calculates the tweedie evaluation metric (tweedie-nloglik) we can see that it is calculated as: bst_float a = y * std::exp((1 - rho_) * std::log(p)) / (1 - rho_); bst_float b = std::exp((2 - rho_) * std::log(p))…
Harald123
  • 13
  • 3
0
votes
1 answer

Does an evaluation function for a chess game consider all pieces on the board?

I hope this is an easily answered question, but I am slightly confused about how an evaluation function for a chess game works. I am using a minimax algorithm that evaluates the board at the leaf nodes, taking into account material, piece-square…
Nalyd
  • 95
  • 1
  • 16
0
votes
0 answers

Game playing AI, how to find a good board evaluation function?

I'm working on an AI to play a fairly simple game, using minimax and genetic algorithms to find weights to score board states with. The game resembles 4x4 tictactoe, but a turn can be spent to move a piece to an adjacent space, pieces come in…
1
2