|  | @@ -143,7 +143,7 @@ fn negamax(game: &mut Game, sc: &mut SearchControl, hash: &mut Cache, mut alpha:
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      if depth == 0 {
 | 
	
		
			
				|  |  | -        return quiescence_search(game, sc, hash, alpha, beta, 9);
 | 
	
		
			
				|  |  | +        return quiescence_search(game, sc, hash, alpha, beta, 100);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      sc.nodes += 1;
 | 
	
	
		
			
				|  | @@ -153,8 +153,6 @@ fn negamax(game: &mut Game, sc: &mut SearchControl, hash: &mut Cache, mut alpha:
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -    if game.get_piece(KING, game.turn) == 0 { return (-mate(), false); }
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      let mut moves = generate_legal_moves(game, game.turn);
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -213,7 +211,7 @@ fn negamax(game: &mut Game, sc: &mut SearchControl, hash: &mut Cache, mut alpha:
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if val >= beta {
 | 
	
		
			
				|  |  |              game.undo_move(undo);
 | 
	
		
			
				|  |  | -            hash.cache(game, CacheEntry::new_lower(depth, val));
 | 
	
		
			
				|  |  | +            hash.cache(game, CacheEntry::new_upper(depth, val));
 | 
	
		
			
				|  |  |              //println!("but ret {}: {}", depth, beta);
 | 
	
		
			
				|  |  |              return (beta, false);
 | 
	
		
			
				|  |  |          }
 | 
	
	
		
			
				|  | @@ -229,7 +227,7 @@ fn negamax(game: &mut Game, sc: &mut SearchControl, hash: &mut Cache, mut alpha:
 | 
	
		
			
				|  |  |          hash.cache(game, CacheEntry::new_value(depth, alpha));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      else {
 | 
	
		
			
				|  |  | -        hash.cache(game, CacheEntry::new_upper(depth, alpha));
 | 
	
		
			
				|  |  | +        hash.cache(game, CacheEntry::new_lower(depth, alpha));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      //info!("best alpha {}", best);
 | 
	
		
			
				|  |  |      return (alpha, false);
 |