Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

99
Vistas
How to improve the speed resetting a minimax chess board implementation?

I am programming a chess engine with minimax.

I use an array with 120 elements for the board. For every possible move, I have to create a copy of this array which is really slow without using bitboard.

Can I fasten this board copy part, e.g. using strings?

pisces.forEach(pisce=>{
    pisce.forEach(move=>{
          let copy=[...board]
          //other stuff
          board=copy
    })
})             
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Instead of copying the board, you could consider using a "do-undo" system:

pisces.forEach(pisce=>{
    pisce.forEach(move=>{
        play(board, move);
        //other stuff
        undo(board, move);
    })
})

NB: in chess you need also to keep track of whether castling is still allowed, en passent capture is allowed, how many moves have passed since the last capture, pawn or castling move (for applying the 50-move rule), ... So a move object should have enough information to set and undo such state changes.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda