New Engine

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

ChrisFlorin
Posts: 11
Joined: Tue Oct 25, 2011 7:35 pm
Location: Orlando, Florida, United States

New Engine

Post by ChrisFlorin »

First, let me introduce myself. My name is Chris Florin; I am a 30 year old Computer Engineering undergraduate student at UCF and looking to do something more with my life than cooking food at a restaurant. Due to a catastrophic hard drive failure last summer when I shipped my computer to Colorado because I was staying with family for the summer, I have lost all of the programming work I've ever done. Without online backups that I have now, I really have no way of proving or showing off my programming talent to prospective employers. I'm hoping to release a beta version of a chess engine I wrote (named Blackmail) on a website that is still under development :P

I have been writing a chess engine for a little over a year and a half now (as well as lurking on the forums here); in fact, the first version of it was wiped along with everything else. I would like to release a beta version for people to download, use, and help test, however I'm afraid of some permissions that I might need. In the beginning, I used Beowulf and Crafty as good sources of information, but lately I've been looking to Crafty and Stockfish. I downloaded Ippolit and a few others, but either found the code confusing or not useful to me.

I understand that it's illegal and frowned upon to copy source code, but I'm not sure about some of the code I've copied and/or rewritten. The authors of these particular engines use these forums often, so hopefully they may see my post here.

I'm also worried about using evaluation parameters from other engines. Blackmail has quite a few evaluation parameters, but they are either zero, untuned, or ripped from other engines. I also detail Blackmail's evaluation parameters below.

Right now, with all of the zero parameters deleted, Blackmail is able to score 31% against the version of S.O.S. that is downloaded with Arena 3.0. Due to my limited processing power, I have not had the time to test against the other engines or tune some of the parameters.

Beowulf:

comm.cpp (38):

Code: Select all

//Code to disable buffering from Beowulf
//Code from Beowulf also found in MSDN: http://msdn.microsoft.com/en-us/library/ms682499(v=vs.85).aspx

/* No buffering, please... */
setbuf(stdout, NULL);
setbuf(stdin, NULL);
/* and I *really* mean it, too! */
setvbuf(stdout, NULL, _IONBF, 0);
setvbuf(stdin, NULL, _IONBF, 0);
fflush(NULL);
Crafty:

search.cpp (108):

Code: Select all

int LMR_remaining_depth = 1;      /* leave 1 full ply after reductions */
int LMR_min_reduction = 0;        /* minimum reduction 1 ply */
int LMR_max_reduction = 1;        /* maximum reduction 2 plies */
search.cpp (1097):

I copied the LMR from crafty; how many different ways can I really do this? Instead of using searchedmoves as crafty does, I use ordinary moves, so this only gets triggered after all captures are searched, and ordinary moves start being searched. There are 2 killers, so they are not reduced either. The min macro conflicted with one of the min macros from a standard .h file, so I changed it.

Code: Select all

if ( (movingpiece != PAWN) || !( ( whitetomove ? (PassedPawnCheck[from] & board->BlackPawns) == EMPTY_BITBOARD : (PassedPawnCheck[flipPosY(from)] & _byteswap_uint64(board->WhitePawns)) == EMPTY_BITBOARD ) ) ) {
	extensions = cf_min(-cf_min(depthleft - 1 - LMR_remaining_depth, (ordinarymoves > 2) ? LMR_max_reduction : LMR_min_reduction), 0);
}
I'm also using PST tables from Crafty for KBNK and other end games, and for move ordering when no history scores are available. The first versions of Blackmail used Material + PST in the eval, but I took the PST from the eval. I may put it back in and auto tune it, but for now they are not used for eval, except for pawn advancement.

Stockfish:

board.h (35):

I needed the ++ operator for the PieceType for the SEE function below and some of these enums are just simply useful.

Code: Select all

enum PieceType {
  EMPTY = 0,
  PAWN = 1, KNIGHT = 2, BISHOP = 3, ROOK = 4, QUEEN = 5, KING = 6,
  NUMPIECES = 7
};

//"Borrowed" from Stockfish
inline PieceType operator++ (PieceType& d, int) {d = PieceType(int(d) + 1); return d; }

enum Square {
  A1, B1, C1, D1, E1, F1, G1, H1,
  A2, B2, C2, D2, E2, F2, G2, H2,
  A3, B3, C3, D3, E3, F3, G3, H3,
  A4, B4, C4, D4, E4, F4, G4, H4,
  A5, B5, C5, D5, E5, F5, G5, H5,
  A6, B6, C6, D6, E6, F6, G6, H6,
  A7, B7, C7, D7, E7, F7, G7, H7,
  A8, B8, C8, D8, E8, F8, G8, H8
};

enum File { FILEA, FILEB, FILEC, FILED, FILEE, FILEF, FILEG, FILEH };
enum Rank { RANK1, RANK2, RANK3, RANK4, RANK5, RANK6, RANK7, RANK8 };
eval.cpp (785):

The pawn evaluation was almost literally ripped from Stockfish, although I believe I changed the order of the if statements if I remember right. I also added a few other things like pawn phalanx, but deleted those from the code posted here.

Code: Select all

bool notbackward = false, opposed = false, passed = false;

//Is this a passed pawn?
if ( (PassedPawnCheck[position] & board->BlackPawns) == EMPTY_BITBOARD ) {
	pawnscore1 += CurrentPersonality->PassedPawnAdvance[phase][position];
	pawnscore2 += CurrentPersonality->PassedPawnAdvance[phase+1][position];

	passed = true;
	notbackward = true;
} else	//A pawn cannot be passed and opposed at the same time

//Is this an opposed pawn?
opposed = (PiecesInFrontOfPosition[position] & board->BlackPawns) != EMPTY_BITBOARD;

//Is this a doubled pawn (only penalized the ones in the back)?
if ( (PiecesInFrontOfPosition[position] & board->WhitePawns) != EMPTY_BITBOARD ) {
	pawnscore1 -= CurrentPersonality->PawnStructureDoubled[phase][getFile(position)];
	pawnscore2 -= CurrentPersonality->PawnStructureDoubled[phase+1][getFile(position)];
}

//Is this an isolated pawn?
if ( (bbFileNeighbors[getFile(position)] & board->WhitePawns) == EMPTY_BITBOARD ) {
	//The check to see if this pawn is already flagged as passed is inside the isolated check
	//	because an isolated passed pawn still cannot be part of a pawn chain, but i don't want
	//	to penalize isolated passed pawns
	if ( !passed) {
		pawnscore1 -= CurrentPersonality->PawnStructureIsolated[opposed][phase][getFile(position)];
		pawnscore2 -= CurrentPersonality->PawnStructureIsolated[opposed][phase+1][getFile(position)];

		notbackward = true;
	}
} else	//A pawn cannot be isolated and part of a pawn chain at the same time

//Is this part of a pawn chain?
if ( (BlackPawnCaptures[position] & board->WhitePawns) != EMPTY_BITBOARD ) {
	pawnscore1 += CurrentPersonality->PawnStructureChain[phase][getFile(position)];
	pawnscore2 += CurrentPersonality->PawnStructureChain[phase+1][getFile(position)];

	notbackward = true;
}

if ( !(notbackward) //A pawn cannot be backward if it's passed, isolated or part of a pawn chain
	&& ((WhitePawnCaptures[position] & board->BlackPawns) == EMPTY_BITBOARD) ) {

	BITBOARD b = WhitePawnCaptures[position];
	BITBOARD allPawns = board->WhitePawns | board->BlackPawns;

	while ( (b & (allPawns)) != EMPTY_BITBOARD ) {
		b = b << 8;
	&#125;

	if ( (&#40;b | &#40;b << 8&#41;) & board->BlackPawns&#41; != EMPTY_BITBOARD ) &#123;
		//Apply penalty for a backward pawn
		pawnscore1 -= CurrentPersonality->PawnStructureBackward&#91;opposed&#93;&#91;phase&#93;&#91;getFile&#40;position&#41;&#93;;
		pawnscore2 -= CurrentPersonality->PawnStructureBackward&#91;opposed&#93;&#91;phase+1&#93;&#91;getFile&#40;position&#41;&#93;;
	&#125;
&#125;
search.cpp (855):

Basic adaptable null reduction depth. I haven't tuned this, nor am I using fractional plies, but plan to later.

Code: Select all

int nullreduction = 3 + ( depthleft >= 5 ? depthleft / 8 &#58; 0 );
search.cpp (1567):

I changed a few things from Stockfish, including early exit and not counting pinned pieces. I, however, am not currently taking en passant captures into account.

Code: Select all

int SEEScore&#40;Board *board, int fromsquare, int tosquare&#41;
&#123;
	PieceType capturedpiece = board->pieces&#91;tosquare&#93;;
	PieceType movingpiece = board->pieces&#91;fromsquare&#93;;
	PieceType pt;

	PieceType bestknown&#91;2&#93; = &#123; PAWN, PAWN &#125;;

	bool whitetomove = whiteToMove&#40;board&#41;;

	//1&#41; If the captured piece value <= the moving piece value, return a quick SEE score
	if ( see_scores&#91;capturedpiece&#93; > see_scores&#91;movingpiece&#93; ) &#123;
		//Return worst case&#58; the piece we moved gets recaptured
		return see_scores&#91;capturedpiece&#93; - see_scores&#91;movingpiece&#93;;
	&#125;

	//2&#41; The king cannot be recaptured, simply return the score of the captured piece
	if ( capturedpiece == KING ) &#123;
		return see_scores&#91;KING&#93;;
	&#125;

	BITBOARD occupied, attackers, stmattackers, b, pieces;

	//There will never be more than 32 pieces attacking a specific square
	int gain&#91;32&#93;, d = 1;

	//CHANGE&#58; Blackmail takes into account that pinned pieces cannot participate in SEE calculations UNLESS
	//	the destination square is a valid square for it to move to
	occupied = ( board->inbetween_squares & OneShiftedBy&#91;tosquare&#93; ? board->AllPieces &#58; board->AllPieces & ~board->pinned_pieces );
/*
  // Handle en passant moves
  if &#40;st->epSquare == to && type_of_piece_on&#40;from&#41; == PAWN&#41;
  &#123;
      Square capQq = &#40;side_to_move&#40;) == WHITE ? to - DELTA_N &#58; to - DELTA_S&#41;;

      assert&#40;capturedType == PIECE_TYPE_NONE&#41;;
      assert&#40;type_of_piece_on&#40;capQq&#41; == PAWN&#41;;

      // Remove the captured pawn
      clear_bit&#40;&occupied, capQq&#41;;
      capturedType = PAWN;
  &#125;
*/

  // Find all attackers to the destination square, with the moving piece
  // removed, but possibly an X-ray attacker added behind it.
	occupied = &#40;occupied | OneShiftedBy&#91;tosquare&#93;) ^ OneShiftedBy&#91;tosquare&#93;;
	occupied = &#40;occupied | OneShiftedBy&#91;fromsquare&#93;) ^ OneShiftedBy&#91;fromsquare&#93;;

	BITBOARD allbishops = &#40;board->WhiteBishops | board->BlackBishops | board->WhiteQueens | board->BlackQueens&#41;;
	BITBOARD allrooks = &#40;board->WhiteRooks | board->BlackRooks | board->WhiteQueens | board->BlackQueens&#41;;

	attackers = &#40;WhitePawnCaptures&#91;tosquare&#93; & board->BlackPawns | BlackPawnCaptures&#91;tosquare&#93; & board->WhitePawns&#41;
		| KnightMoves&#91;tosquare&#93; & &#40;board->WhiteKnights | board->BlackKnights&#41;
		| bishopmoves&#40;board, tosquare&#41; & allbishops
		| rookmoves&#40;board, tosquare&#41; & allrooks
		| KingMoves&#91;tosquare&#93; & &#40;board->WhiteKing | board->BlackKing&#41;;

	attackers &= occupied;

	// If the opponent has no attackers we are finished
	whitetomove = !whitetomove;

	stmattackers = attackers & ( whitetomove ? board->WhitePieces &#58; board->BlackPieces );

	if ( stmattackers == EMPTY_BITBOARD ) &#123;
		return see_scores&#91;capturedpiece&#93;;
	&#125;

	gain&#91;0&#93; = see_scores&#91;capturedpiece&#93;;
	capturedpiece = movingpiece;

	while ( stmattackers ) &#123;
		// Locate the least valuable attacker for the side to move. The loop
		// below looks like it is potentially infinite, but it isn't. We know
		// that the side to move still has at least one attacker left.
		bool found = false;

		pt = bestknown&#91;whitetomove&#93;;
		while ( &#40;pt < KING&#41; && !found ) &#123;
			switch &#40;pt&#41; &#123;
			case PAWN&#58;
				pieces = ( whitetomove ? board->WhitePawns &#58; board->BlackPawns );
				break;
			case KNIGHT&#58;
				pieces = ( whitetomove ? board->WhiteKnights &#58; board->BlackKnights );
				break;
			case BISHOP&#58;
				pieces = ( whitetomove ? board->WhiteBishops &#58; board->BlackBishops );
				break;
			case ROOK&#58;
				pieces = ( whitetomove ? board->WhiteRooks &#58; board->BlackRooks );
				break;
			case QUEEN&#58;
				pieces = ( whitetomove ? board->WhiteQueens &#58; board->BlackQueens );
				break;
			case KING&#58;
				pieces = ( whitetomove ? board->WhiteKing &#58; board->BlackKing );
			&#125;

			if ( ( stmattackers & pieces ) != EMPTY_BITBOARD ) &#123;
				found = true;
			&#125; else &#123;
				pt ++;
			&#125;
		&#125;

		//Save the lowest point, so next loop around, we can start there instead of starting at pawn again
		bestknown&#91;whitetomove&#93; = pt;

		b = stmattackers & pieces;
		occupied ^= &#40;b & (~b + 1&#41;);
		attackers |= bishopmoves&#40;board, tosquare&#41; & allbishops | rookmoves&#40;board, tosquare&#41; & allrooks;

		attackers &= occupied;

		// Add the new entry to the swap list
		gain&#91;d&#93; = see_scores&#91;capturedpiece&#93; - gain&#91;d-1&#93;;
		d++;

		//CHANGE&#58; early pruning of the SEE score
//		if ( see_scores&#91;capturedpiece&#93; > see_scores&#91;pt&#93; ) &#123;
//			break;
//		&#125;

		//CHANGE&#58; early pruning of the SEE score.  Q&#58; Is this the same as my code above?
		if ( cf_max&#40;-gain&#91;d-1&#93;, gain&#91;d&#93;) < 0 ) &#123;
			break;
		&#125;

		// Remember the value of the capturing piece, and change the side to
		// move before beginning the next iteration.
		capturedpiece = pt;
		whitetomove = !whitetomove;
		stmattackers = attackers & ( whitetomove ? board->WhitePieces &#58; board->BlackPieces );

		// Stop before processing a king capture
		if ( capturedpiece == KING && stmattackers ) &#123;
			gain&#91;d&#93; = see_scores&#91;KING&#93; - gain&#91;d-1&#93;;
			d++;
			break;
		&#125;
	&#125;

	// Having built the swap list, we negamax through it to find the best
	// achievable score from the point of view of the side to move.
	while (--d&#41;
	&#123;
		gain&#91;d-1&#93; = cf_min&#40;-gain&#91;d&#93;, gain&#91;d-1&#93;);
	&#125;

	return gain&#91;0&#93;;
&#125;
I'm using Obstruction Difference from http://chessprogramming.wikispaces.com/ ... Difference, though I'm not sure if there's a copyright on it, or if I should paraphrase the code at minimum.

Code: Select all

#define bishopmoves&#40;x,srcpos&#41; ( lineAttacks&#40;x->AllPieces, &MagicMoveMaskList&#91;srcpos&#93;&#91;MAGICMOVE_DIAG&#93;) | lineAttacks&#40;x->AllPieces, &MagicMoveMaskList&#91;srcpos&#93;&#91;MAGICMOVE_ANTI&#93;) )
#define rookmoves&#40;x,srcpos&#41; ( lineAttacks&#40;x->AllPieces, &MagicMoveMaskList&#91;srcpos&#93;&#91;MAGICMOVE_FILE&#93;) | lineAttacks&#40;board->AllPieces, &MagicMoveMaskList&#91;srcpos&#93;&#91;MAGICMOVE_RANK&#93;) )
#define queenmoves&#40;x,srcpos&#41; ( bishopmoves&#40;x,srcpos&#41; | rookmoves&#40;x,srcpos&#41; )
Blackmail Evaluation:

Most of the values used for evaluation are either zero, untuned, or ripped from another engine. For most of the parameters, I implemented them, ran around 1000 games or so, and tested the difference. Most changes to the evaluation were in the 20-40 elo range.

Code: Select all

 *	Material &#40;100, 325, 325, 575, 1050&#41;
 *	Pawn Structure &#40;pawn structure scores are stored in a hashtable&#41;
 *	- Advancement &#40;ripped from Crafty, small adjustment to 7th rank pawns&#41;
 *	- Phalanx &#40;zero&#41;
 *		- A "phalanxed" pawn has another pawn next to it.
 *		- Only one bonus is applied for two pawns next to each other, two bonuses are applied for
 *			three pawns next to each other.
 *	- Passed Pawn Advancement &#40;same as standard advancement&#41;
 *	- Opposed Pawns	&#40;ripped from Stockfish&#41;
 *		- "opposed" pawns have an enemy pawn in front of them, regardless of how far.
 *	- Doubled Pawns &#40;ripped from Stockfish&#41;
 *		- "doubled" pawns have a friendly pawn in front of them, regardless of how far.
 *		- The pawn in front is not considered "doubled."  If pawns are tripled, then there are two
 *			"doubled" pawns.
 *	- Isolated pawns &#40;ripped from Stockfish&#41;
 *		- "isolated" pawns have no friendly pawns on either side.
 *		- "doubled" pawns may both still be considered "isolated."
 *		- "passed" pawns are not counted as "isolated."
 *	- Pawn Chains &#40;ripped from Stockfish&#41;
 *		- "chained" pawns have another pawn behind them defending it
 *	- Backward Pawns &#40;ripped from Stockfish&#41;
 *		- A "backward" pawn is complicated to explain &#58;P
 *		- "passed," "isolated," or "chained" pawns cannot be backward pawns.
 *	- Pieces which are attacked &#40;zero&#41;
 *	Penalize pieces that are pinned against the King
 *	- Mobility
 *	- Center Control
 *	King Development
 *	- King Centrality &#40;untuned, pretty much just says to the engine "please castle")
 *	- Unstoppable Passed Pawn &#40;zero&#41;
 *		- A pawn is considered "unstoppable" if the opposing king cannot catch it to its queening square.
 *		- This is under King Development and not Pawn Structure because it depends on the position of the enemy king.
 *	Knights
 *	- Knight Pair &#40;untuned&#41;
 *	- Empty Square mobility &#40;ripped from Stockfish&#41;
 *	- Enemy King Tropism &#40;zero&#41;
 *	- Pieces which are attacked &#40;zero&#41;
 *	Bishops
 *	- Bishop Pair &#40;untuned&#41;
 *	- Empty Square mobility &#40;ripped from Stockfish&#41;
 *	- Enemy King Tropism &#40;zero&#41;
 *	- Pieces which are attacked &#40;zero&#41;
 *	- Good/Bad Bishops &#40;untuned&#41;
 *	Rooks
 *	- Rook Pair &#40;untuned&#41;
 *	- Connected Rooks &#40;code assumes <= 2 rooks&#41; &#40;untuned&#41;
 *	- Bonus for rooks on 7th rank &#40;untuned&#41;
 *	- Bonus for rooks on an empty file &#40;zero&#41;
 *	- Empty Square mobility &#40;ripped from Stockfish&#41;
 *	- Rooks behind passed pawns &#40;zero&#41;
 *	- Enemy King Tropism &#40;zero&#41;
 *	- Pieces which are attacked &#40;zero&#41;
 *	Queens
 *	- Bonus for queens on 7th rank &#40;untuned&#41;
 *	- Bonus for queens on an empty file &#40;zero&#41;
 *	- Empty Square mobility &#40;ripped from Stockfish&#41;
 *	- Queens behind passed pawns &#40;zero&#41;
 *	- Enemy King Tropism &#40;zero&#41;
 *	- Pieces which are attacked &#40;zero&#41;
Regarding parameter tuning: I'm going to download games from chessgames.com and use the oracle method to auto tune parameters, probably using a genetic algorithm in the beginning. If people are interested, and I have permission from Dr. Hyatt and authors of Stockfish to use what I have posted, then I will post the most recent of Blackmail for free download.

Blackmail's code is tuned pretty well for speed; my perft runs around 70M nodes per second without a hash from the start position. Evaluation could use some work, but is still pretty fast and awaiting hand written assembly code.

Oh, and it only runs on Windows. Sorry Dr. Hyatt :( I'll get it working on linux when I can find a box to write it on and a few days time to write.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: New Engine

Post by mcostalba »

ChrisFlorin wrote:If people are interested, and I have permission from Dr. Hyatt and authors of Stockfish to use what I have posted, then I will post the most recent of Blackmail for free download.
You can copy as much as you want from Stockfish as long as you honor the GPL license under which Stockfish is released, in particular, in case you decide to release Blackmail, you should release the sources too.

BTW, yes I am interested, and I wish you also good luck for finding a job you may like....although cooking is not a bad job, actually in Italy it is considered a top job if you know how to do it well ;-)
ChrisFlorin
Posts: 11
Joined: Tue Oct 25, 2011 7:35 pm
Location: Orlando, Florida, United States

Re: New Engine

Post by ChrisFlorin »

mcostalba wrote:
ChrisFlorin wrote:If people are interested, and I have permission from Dr. Hyatt and authors of Stockfish to use what I have posted, then I will post the most recent of Blackmail for free download.
You can copy as much as you want from Stockfish as long as you honor the GPL license under which Stockfish is released, in particular, in case you decide to release Blackmail, you should release the sources too.
There's the catch. I don't intend to release my source, but I'm aware of the GPL on Stockfish, and the naming convention requirement on Crafty should I ever enter Blackmail in a tournament. The rest of the source of Blackmail is 100% original, rewritten from concepts in my own head. My first attempt at SEE was horrible; it worked most of the time, but not reliably enough. I ended up copying from chessprogramming.wikispaces.com and it still didn't feel right.

My real questions are these:

1) Is my source different enough from the original engines they were copied from that I the GPL would not apply?

2) Does my source demonstrate that I fully understand the concepts?

3) Do I need to change the parameter values I'm using right now? I don't have the processing power right now to hand tune any of the values, but would be willing to weaken Blackmail for now if I have to.
BTW, yes I am interested, and I wish you also good luck for finding a job you may like....although cooking is not a bad job, actually in Italy it is considered a top job if you know how to do it well ;-)
Don't get me wrong, I love cooking. But for minimum wage, it certainly is not a top job here in the U.S. unless I go to school for it. I've spent several years as a Shift Manager in a restaurant, but had to downgrade to cook when I moved to Orlando for school. I could be doing better than minimum wage is my real point; I didn't mean to knock cooking by any means. I wish I could take a trip to Italy; maybe in a few years! I'm thinking Torino :)
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: New Engine

Post by ZirconiumX »

The GPL would still apply - you would have to remove every last piece of code from Stockfish to remove the GPL. Posting 'snippets' also helps sow us what you have done, but no - it isn't necessary. I would say that the values for the parameters should be retuned - your engine isn't stockfish - so it may be weaker because of that. Tuning doesn't need to be done manually, forum search for CLOP and cutechess, and that should get you started.

Matthew:out
kranium
Posts: 2129
Joined: Thu May 29, 2008 10:43 am

Re: New Engine

Post by kranium »

Greetings Chris-

I do understand you trying to start squeaky clean..., but I do suggest the following time-honored (and proven successful) strategy:

1.) Use what you want, what you need, regardless of license (as per many of today's top 'authors' (Vas R., R. Houdart, etc.)

2.) Simply issue some sort of generic and ubiquitous blanket 'acknowledgment' statement, such as:

'I went thru the (Fruit 2.1) source code backwards and forward and took many things'
or
"Without many ideas and techniques from the open source chess engines Ippolit and Stockfish and Crafty (in that order) Blackmail would not nearly be as strong as it is now."

3.) Remain absent from this forum, and aloof to anything posted here

4.) If confronted with questions and/or evidence of license violation or plagiarism, put into practice these 3 important principles:
"ignore, deny, and dance with words"

Worse case scenario: if #4 happens, no problem...
you simply go on releasing (and even selling your engine)...just remember! that you may have to live with the dreaded gray CCRL 'controversial' tag.

Sincere good luck,
Norm
User avatar
sje
Posts: 4675
Joined: Mon Mar 13, 2006 7:43 pm

My general comment

Post by sje »

My general comment is this:

There are many advantages of building a chess playing program without copying any code. And I mean an entire program, not just a search. The big advantage is that the author will understand all aspects of the code and so will be better able to correct and improve the program's capabilities. Remember that playing strength is not the essence of a good program, just as horsepower is not the essence of a good automobile.

In the larger scheme of things, those who do it by themselves without copying are far more likely to contribute to the entire field with papers, data, algorithms, tool kits, and other resources that benefit every researcher. Those who copy source rarely contribute much of anything, almost as if they need to hide the origins of their programs.

Those who did it without copying include Turing, McCarthy, Bernstein, Samuel (checkers), Kotok, Scherzer, and Donskoy, all of whom have passed. There are others still around today, and their names just might still be known a century from now. On the other hand, I'll guess that most of the cut-and-pasters will be little more than dust in the wind soon after they pass from the scene.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: New Engine

Post by Don »

kranium wrote:Greetings Chris-

I do understand you trying to start squeaky clean..., but I do suggest the following time-honored (and proven successful) strategy:

1.) Use what you want, what you need, regardless of license (as per many of today's top 'authors' (Vas R., R. Houdart, etc.)

2.) Simply issue some sort of generic and ubiquitous blanket 'acknowledgment' statement, such as:

'I went thru the (Fruit 2.1) source code backwards and forward and took many things'
or
"Without many ideas and techniques from the open source chess engines Ippolit and Stockfish and Crafty (in that order) Blackmail would not nearly be as strong as it is now."

3.) Remain absent from this forum, and aloof to anything posted here

4.) If confronted with questions and/or evidence of license violation or plagiarism, put into practice these 3 important principles:
"ignore, deny, and dance with words"
Norm,

Don't forget the part about shifting the blame and character assassination. It's not enough to minimize and deny but you also need this. This involves strong attacks against people who actually HAVE original programs. There are all sorts of clever directions you can take this. You can say they are trying to deprive you of something you are entitled to, or you can simply say they are petty and jealous. You can also accuse them of being out of touch with modern trends and minimize them this way. Make it seem that THEY are the real problem here.


Worse case scenario: if #4 happens, no problem...
you simply go on releasing (and even selling your engine)...just remember! that you may have to live with the dreaded gray CCRL 'controversial' tag.

Sincere good luck,
Norm
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: New Engine

Post by mcostalba »

ChrisFlorin wrote:There's the catch. I don't intend to release my source, but I'm aware of the GPL on Stockfish
In this case, I am sorry, but you need to remove _any_ line copied from Stockfish.

GPL is very clear about this and I want to be very clear too (not because of you in particular, just because this community is a bit old style and some _advanced_ concept like GPL seems not so easy to get absorbed). Of course you can simply, as suggested by Norman, ignore all and hide the SF code inside your engine, then release it and swear it is free of any GPL source, your choice! I can only remember you the technical aspects of the GPL license, not teach you what is ethically right or wrong.


P.S: Good cooks get an high pay in Italy, and I guess even more in USA (also because you have less good cooks than us :-) )
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: New Engine

Post by Don »

mcostalba wrote:
ChrisFlorin wrote:There's the catch. I don't intend to release my source, but I'm aware of the GPL on Stockfish
In this case, I am sorry, but you need to remove _any_ line copied from Stockfish.

GPL is very clear about this and I want to be very clear too (not because of you in particular, just because this community is a bit old style and some _advanced_ concept like GPL seems not so easy to get absorbed). Of course you can simply, as suggested by Norman, ignore all and hide the SF code inside your engine, then release it and swear it is free of any GPL source, your choice! I can only remember you the technical aspects of the GPL license, not teach you what is ethically right or wrong.


P.S: Good cooks get an high pay in Italy, and I guess even more in USA (also because you have less good cooks than us :-) )
GPL is not a new "advanced" or modern concept, it has been around a long time. It was first created in the 1980's (1986) so it has already been 25 years and for many on this forum it has been in existence for as long as they can remember and possible for as long as they have been alive! In 1986 it was not called GPL but that is just semantics. I think it was 3 years later that it officially got the name "GPL."

I agree with you that people cannot seem to grok it and I don't understand that. It's easy to get confused with the fine points, but people often cannot even come close. To them it's just means it's free and you can do anything you want and that is how many people are proceeding.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: New Engine

Post by lucasart »

mcostalba wrote: GPL is very clear about this and I want to be very clear too (not because of you in particular, just because this community is a bit old style and some _advanced_ concept like GPL seems not so easy to get absorbed).
+1 !!