Changes

Jump to: navigation, search

Calculon

3,674 bytes added, 21:54, 23 February 2020
Created page with "'''Home * Engines * Calculon''' FILE:Calculon.jpg|border|right|thumb|200px|link=https://fi.wikipedia.org/wiki/Tiedosto:Calculon.jpg| Calculon <ref>[https..."
'''[[Main Page|Home]] * [[Engines]] * Calculon'''

[[FILE:Calculon.jpg|border|right|thumb|200px|link=https://fi.wikipedia.org/wiki/Tiedosto:Calculon.jpg| Calculon <ref>[https://fi.wikipedia.org/wiki/Calculon Calculon – Wikipedia.fi], crated by [https://en.wikipedia.org/wiki/Matt_Groening Matt Groening]</ref> ]]

'''Calculon''',<br/>
a [[Java]] chess engine by [[Barry Smith]] named after the [https://en.wikipedia.org/wiki/Futurama Futurama] [https://en.wikipedia.org/wiki/List_of_recurring_Futurama_characters#Antonio_Calculon character].
It is [[:Category:Open Source|open source]], licensed under the [https://en.wikipedia.org/wiki/Apache_License Apache License], Version 2.0 and hosted at [https://en.wikipedia.org/wiki/GitHub GitHub] <ref>[https://github.com/BarrySW19/CalculonX CalculonX · GitHub]</ref>.
Calculon is [[UCI]] compatible, uses [[Bitboards|bitboards]] as basic data structure, and applies [[Negamax]] [[Alpha-Beta|alpha-beta]]. The engine regularly plays on [[Internet Chess Club|ICC]] under the name CalculonX and has Blitz/Standard ratings there around the 1750 mark.

=getPiece=
Calculon's ''getPiece'' routine to get a the [[Pieces#PieceTypeCoding|piece code]] of a square (the least significant one-bit of the passed bitboard pos, typically single populated)
from the six [[Bitboard Board-Definition#SixTwo|six piece bitboards]] of its [[Board Representation|board representation]] is an idiosyncratic sample in avoiding a redundant [[8x8 Board|8x8 board]] as well in [[Avoiding Branches|avoiding branches]].
Taking the [[General Setwise Operations#Union|union]] (val) of six piece-specific [[General Setwise Operations#Rotate|rotates]] (left by 1..6) of six piece disjoint [[General Setwise Operations#Intersection|intersections]]
for the absolute difference of the [[BitScan#TrailingZeroCount|trailing zero counts]] of that union and the passed square bitboard (pos) is a bit too much calculation for that purpose <ref>[https://github.com/BarrySW19/CalculonX/blob/master/src/main/java/barrysw19/calculon/engine/BitBoard.java#L418 CalculonX/BitBoard.java at master · BarrySW19/CalculonX · GitHub]</ref>.
<pre>
public class BitBoard { // Position object

public byte getPiece(long pos) {
long val = Long.rotateLeft(bitmaps[MAP_PAWNS] & pos, MAP_PAWNS)
| Long.rotateLeft(bitmaps[MAP_KNIGHTS] & pos, MAP_KNIGHTS)
| Long.rotateLeft(bitmaps[MAP_BISHOPS] & pos, MAP_BISHOPS)
| Long.rotateLeft(bitmaps[MAP_ROOKS] & pos, MAP_ROOKS)
| Long.rotateLeft(bitmaps[MAP_QUEENS] & pos, MAP_QUEENS)
| Long.rotateLeft(bitmaps[MAP_KINGS] & pos, MAP_KINGS);
if(val == 0) {
return Piece.EMPTY;
}
return (byte) ((Long.numberOfTrailingZeros(val) - Long.numberOfTrailingZeros(pos)) & 0x07);
}
}
</pre>
=External Links=
==Chess Engine==
* [https://github.com/BarrySW19/CalculonX CalculonX · GitHub]
==Misc==
* [https://futurama.fandom.com/wiki/Calculon Calculon - Futurama Wiki, the Futurama database]
* [https://futurama.fandom.com/wiki/Calculon_2.0 Calculon 2.0 - Futurama Wiki, the Futurama database]
* [http://theinfosphere.org/Calculon Calculon - The Infosphere, the Futurama Wiki]
* [http://theinfosphere.org/Calculon_%28All_My_Circuits%29 Calculon (All My Circuits) - The Infosphere, the Futurama Wiki]
* [http://www.imdb.com/character/ch0047016/ Calculon (Character) - IMDb - Movies, TV and Celebrities]
* [https://en.wikipedia.org/wiki/Calculon_2.0 Calculon 2.0 from Wikipedia]

=References=
<references />
'''[[Engines|Up one Level]]'''
[[Category:Open Source]]
[[Category:UCI]]
[[Category:Java]]
[[Category:Comics]]
[[Category:Fiction]]

Navigation menu