## Learning Chess from data

Video in TIB AV-Portal: Learning Chess from data

 Title Learning Chess from data Title of Series EuroPython 2014 Part Number 105 Number of Parts 120 Author License CC Attribution 3.0 Unported:You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. Identifiers 10.5446/20013 (DOI) Publisher Release Date 2014 Language English Production Place Berlin

 Subject Area Computer Science Abstract Niv/tomr - Learning Chess from data Is watching a chess game enough to figure out the rules? What is common denominator between different plays and game ending? In this presentation, we will show how Machine Learning and Hadoop can help us re-discover chess rules and gain new understanding of the game. ----- Can empirical samples unveil the big picture? Is chess games descriptions expose good enough data to gain understanding of chess rules - legal piece moves, castling, check versus checkmate, etc. Which features are important in describing a chess game and which features are not. What is a good representation of a chess game for this uses. What is the minimal sample size which is required in order to learn this in a good enough manner and where this learning can go wrong. **Ne3 => E=mc2** Looking at the bigger picture - Can we understand big systems based on empirical samples. Can we reverse engineer physics and discover how physical system work based on no external knowledge beside empirical samples. Keywords EuroPython Conference EP 2014 EuroPython 2014
Computer chess Multiplication sign
Computer chess Computer Endliche Modelltheorie Computer
Domain name Computer chess Computer chess State of matter Multiplication sign Decision theory Graph (mathematics) State of matter Computer Physicalism Set (mathematics) Limit (category theory) Latent heat Latent heat Word Mathematics Process (computing) Roundness (object) Whiteboard Game theory Whiteboard Game theory Resultant Physical system
Greatest element Word Uniform resource locator Graph (mathematics) Square number Right angle Bit Number
Parsing Computer chess Algebraic number Decision theory Bit Stack (abstract data type) Mereology Virtual machine Architecture Medical imaging Positional notation Integrated development environment Partial derivative Website Process (computing) Endliche Modelltheorie Game theory Partial derivative
Histogram Computer chess Multiplication sign Interior (topology) Virtual machine Differenz <Mathematik> Latent heat Whiteboard Read-only memory Semiconductor memory Different (Kate Ryan album) Uniform resource name Function (mathematics) Single-precision floating-point format Right angle Game theory
Stress (mechanics) Website
Revision control Word Read-only memory Whiteboard State of matter Multiplication sign Website Computer simulation Condition number Condition number
Histogram Histogram Computer configuration Whiteboard State of matter Radius Function (mathematics) Direction (geometry) Graph (mathematics) Square number Right angle Whiteboard
Freeware Whiteboard Military base Multiplication sign Right angle Whiteboard Rule of inference Theory Physical system
Integrated development environment Bit rate Limit (category theory) Resultant
Domain name Noise (electronics) Support vector machine State of matter Sampling (statistics) Set (mathematics) Division (mathematics) Wave packet Kernel (computing) Sample (statistics) Kernel (computing) Crash (computing) Linearization Software testing Testmenge Endliche Modelltheorie Resultant Linear map
Revision control Category of being Functional (mathematics) Different (Kate Ryan album) Crash (computing) Projective plane Website Social class Endliche Modelltheorie Sample (statistics) Wave packet Task (computing)
Multiplication sign Counting Total S.A. Counting Total S.A. Number Type theory Whiteboard Prediction Different (Kate Ryan album) Personal digital assistant Telecommunication Streamlines, streaklines, and pathlines Social class Whiteboard Social class Data type
Degree (graph theory) Single-precision floating-point format Degree (graph theory) Whiteboard Right angle Whiteboard
Revision control Social class
Revision control Software engineering Word Social class Heuristic Game theory
Computer chess Slide rule Parsing Computer chess Parsing Multiplication sign Graph (mathematics) Complex (psychology) Sampling (statistics) Sound effect Counting Mathematics Bit rate Whiteboard Personal digital assistant Term (mathematics) Different (Kate Ryan album) Software testing Social class Right angle Whiteboard Multiplication Physical system
Medical imaging Electric generator Bit rate Hypermedia Multiplication sign Correspondence (mathematics) Right angle Theory Machine vision Social class
please welcome Tom I have been made for the company in 1986 ongoing and all of the presented resulting in good and then as you can see above there's lots and lots of things will look very much at the time needed and then yes so what I'm
going to talk about today is that just from that of but what everyone wants to make computers they get smarter where the models
and we just want to make a computer to to play chess but on so what might want to know if a computer can let their interest only by looking at
the data of just and so there are many questions that can be asked in this domain with regard to focus today on on just those questions 1 is giving a border state but can we make use of that we do it's specific movies that the and that 1 is getting more forgiving aboard states is that checkmate and again and again and again of course if the possible ban on the sky is the limit and what else can we empirically learned about order systems may be from fit some physics and other things and I want to mention this is that this is a work-in-progress were still working on it without have additional and the fauna and this is what I came here today to show you what we have done so far the result of that stuff and what we know about chess and there is the 1st time that there is some constant
tension between feature that we a lot of stuff to know when during the learning process and features for i things that we want to know what the 1st we know that there are 2 sides to parties who played the game we know on that date and and we either 1 minute or a time no 2 winners or other situations we know that the board is made by and doesn't change through the game we that there are different this is that have different unknown properties such as how can our those pieces mood and candidate under decisions and what happened to them when they get again maybe promotional rounds and so on all I'm looking OK so that the set of words is given in the chestnut
nation will have sometime in there and I'll show you it looks like but the idea is that every graph on the bottom is represented by a letter and 2 to right and the number 1 and 2 are right in the middle it is basically done from 1 word to another and are usually only there to is written and that's why there's
only 1 that individuals or if it's not learned and they're both the 2 and the from square is written all that on this surface such as the right location and so on we have just a bit more than our 1 thousand
and 100 thousand gallons and with full partial decision there were many against it and I don't change or and digest and in the middle and had a bit more than a million most with the this use tribution between the different pieces all millions of the environment whatever package which is culture just the those 2 parts to them in the nation and provided
there is more than that to provide an image like this this is just to show me and so on and sometimes many site by someone look for a blocking and then 1 time but if we thought we would have we would have not enough or big enough that the 4 of the model
and all the remembered as as the government to you might produce about for that is that it was enough to do it on a single machine and maybe some in the future so this that I think we wanted to do and the 1st question would rest before the
game on them into a single movie so Demosthenes thing would be that would be that would be formed by saying moving the Boston status and the more I want to if so yes good there not to write that being there's not enough data the so I haven't seen that 1 or maybe it's not later and therefore haven't seen and it's not efficient on knowing the right time and memory and so and so forth no learned here so let's move toward second you and so for each move for each move women we check them different from there to ascribe to and from work and to is and the the history for example if they pump moves on steps and the 1st time on more than he eats difference is 0 and the way it is the and we need some adjustments of then that white so it would be relative and now can see that histogram so this is this when for a bound on the move either 1 step
forward 2 steps or 1 step forward and insights Due to the site this is how the bishop move and this is a among all the stress this is nite movements of
kind of nice but and the king and you can see that king can
move from 1 state to each side and the gasoline to 1 of the sites OK so the price of this approach is it's
very good for some animals and and it didn't matter is that the size of course 1st time revision we can call in ML simulator and by that making use problem words that so if you this is in the way I cannot answer this question we can answer the trunk so so it's a necessary condition if we have enough but it's not sufficient so did the next day we need on the same date was set for each 1 we're not only of the moved but also and the surrounding over
each day so you will see here this is from the and we have 3 possible states once occupied once this really in wines out of the board before setting of the edge of the border and some of them are marked and can be out of the board all and some of the results and that I making those histograms and doing
some work on it so for example for the quiz if the queen wants to move on this direction morning to that 2 steps that on the square above it and the right must be free and that makes sense unknown digestion and I don't think about the quiz if you want to know 7 steps downward and right then this this meant that she is moving across all the
board therefore she must stand in the course in the course and the score must be free but to all right so it's the beginning his theories counseling and the king will then on this 1 Mary should be free must be free also
for deployment of the time Goal goes forward and surprisingly nothing for dinner and non gestural so we know that there then I can jump over bases are not this world doesn't tell us anything because maybe there's not enough that may there is nothing wrong but that's not for us knowing that the rules of the system that then I can skip over pieces then so the price of this also we keep the efficiency is not too much that we need we stop
and cost money and that is running into account so we can argue whether the surrounding is the 1 I used to write more but it was also doing this we says dealt with the so we have a rate of I talked for that we have some external knowledge about the game and about the environment where and so on and then destroyed and the main goal of this is that is is that we assume that moves are independent of 1 another and why we can use you say it's true it's not true for all but the most for example constantly Kincaid
not too costly if was just thinking more before and there upset more in more and more emitted by this limitation on so OK this is what we discussed about most today and we still have an idea to improve it but but we know that these this roughly with results and it's the 1st letter to mention before but so now for an injective map and if
we asked giving us state of a model is a checkmate or not Our not asking whether it the user checkmate who on the left the white we might be best them in the future OK if we assume that the the sets are identical to give at a 100 just the training set we used for the purpose this we use of retraining 64 testing and now we going to you of true and false samples of course there is division of the probability is much less because you only have 1 checkmate at most at the Chiang maybe less and we use SVM suffice with linear kernel from we want to to want to use it in future although we had some nice results just we did this name classifier but now fresh costs about classification for people don't come from this domain Midwest worse from I know noise think fast and
apologize we have a lot to talk about today OK so we start with that that and and then
we extract features island like about the features which we use them in a minute what features can be computed with feature category many many others make a combination many of the features by depend on 1 another there are models for each of the problem and then the user classification some of the data is used for training sample testing some predict we a site for this the Commission and actually were able to cite is very generic and we were able to use a very of because that we use for a for a dozen different task just applying our feature extraction and pushing to the classifier we have and actually but it and on the literature of it is very easy to data between different classifiers it will have it and
try and estimated feed from functions so just the but so here again we have a few projects so the 1st version we had was a
simple count features what what that that we come to the number that of number of that work on the board that counted how many white this is how many but this is for each type these we counted how many of these do of example your 5 White Mountains 3 electrons so we had a total of 8 classes were also counted the number of different white times fire and streamline poems so this practice to something that well is a bit better than 1 gs with the curacy of segments that we had for the cases
word-object more than was the this is a checkmate and whereas for not just men were able to say in 59 per cent of the time that it's not checkmate but then we had some of misclassifications so want to be modulated and 1 so when we moved to the next thing I knew that he was using the previous features and are using that about
the 1st degree neighbors on this assessment and I looked out of the board and excluded that but will do it at all then the next variables and so we looked at all in that of empty isn't all that same on the inside of the piece right looking on from other people 78 and the unabated that for any and all the different pieces on the board there from in each 4 at the end of we also built some 1 features based on this that for example is is there more this is the only for my side of from the other side is the them mostly the end of and and
so forth such features and if we did ahead and prevent I would consider it seeing that on the checkmate right through a thing and it may not able to
Our classifier well on dataset and reception room had 59 % previously so all we're doing much better and that the version was doing taking the same as before by extending the ideas to have 2 and it's through this
makes much more features of status features is not that much and that is
in the next version we can then and more features of which are out but it's not that much and and but it's so as and for its next it less generalize generalize as we
assume something bigger about the game and the word and indeed we would the interest and now our heuristic is 89 going to find them 10 fold a as bring all we can ask for a question as you increasing their ideas to a 4 5 6 8
would improve I personally don't like this approach and don't want to do it because we assume more about the war and about the game and about the system as a whole and I would like to think about an hour or suggest different features so having these eventually what what we think about what we suggest what to do in the future OK so that's different classifiers here we used as
the end may be changing the Quran anything over the nearest neighbor maybe using the uncertainty learning is a possible and I don't know if this is a small change but I think that the 2 would have some interesting effect and the resulting in a wealth of board the edges of the body into the different towns were during OK I think was the winner of which I mentioned earlier is the led we get I there are approaching multi-classification problem where the right 1 where that 1 or it's not judgment or we can use it just as black or white matter if we object which is that for white wine company asking whether a specific situation is just not necessarily chess a complex moved detection of history something writing the story or maybe we can think of other features that represent us of what we've done and maybe for example counting from many times the specific and be is small or something and of course as said and so imagine we want to reduce the that of we have a fixed term that we have again OK more efficient parsing we Duchesse package which which is nice but in some cases we did some something like bootstrapping we don't think that would put it into just would produce what wanted maybe we can our not to not to this that and just the rate ourselves scaling so on for classifying them as a hundred thousand samples it was really hard for our computers and decide it will eventually happen but it was hard so maybe we need to think about distributing it's about using something like slide show and it was mentioned here and there but I think there are many tools that we can think of end of surprising we have time for questions and thank you for listening so far
FIL relationship and I the what
is how long it will always be a ratings so I was reading the size of the was already correlated with there on definitely the all thing that contrary to right so or these problems it was in the learning about the natural solution with the same the last time we the story of his class and then maybe want to you was 1 of the original images and the corresponding question right and Left Alliance is that the just for example madam justice in general generative theory so that was just this vision his visions of you know that if we sum the elements and in the media said it was the ages is you and it has been and is just in United another yeah but knowing what they can do it for the world if you have on the notion that society there are some things that on there are going to have the

### Timings

```  104 ms - page object
```

### Version

AV-Portal 3.21.3 (19e43a18c8aa08bcbdf3e35b975c18acb737c630)
hidden