Archive for the 'chess' Category

World Chess Champion Alexandra Kosteniuk

Wednesday, September 24th, 2008

women chess champion GM Alexandra Kosteniuk, who I wrote about a couple of years ago, is now the new Women’s World Chess Champion. I guess she isn’t into modeling much anymore, although you can still see all her photos on her website.
Kosteniuk beat 14-year old Hou Yifan of China to become the champion.

Kosteniuk said that Hou, a 14-year-old, was her most dangerous opponent and a “great talent.” Kosteniuk said she was afraid of how strong Hou would become in a few years, and predicted that Hou would soon dominate women’s competitions.

A chess program in less than 5kb of Javascript

Thursday, September 18th, 2008

I’m really impressed with this chess program in less than 5kb of javascript.
Here is the code:

<SCRIPT>M=I=P=N=q=K=J=0
Bt=1999
Al=-Bt
Ds=[10,-10]
BE=120
G=[]
R=[]
KL=[3,3]
j=[0,1,5,3,3,9,63,0]
MV=[0,0,[1,10],[21,19,12,8],[11,9],[1,10,11,9],[1,10,11,9],0]
for(z=0;z<8;){j[z+8]=j[z]<<=4
m=MV[z++]
if(m){s=m.length
for(x=0;x<s;){m[s+x]=-m[x++]}}}x='g00000000g'
y='gggggggggg'
b=y+y+"g23456432gg11111111g"+x+x+x+x+"g99999999ggABCDECBAg"+y+y
w=x+x+x+"000111100000123321000123553210"
a='000012346900'
Y=[]
PY=[]
bY=[]
for(y=0;y<12;y++){for(x=0;x<10;x++){z=(y*10)+x
PY[z]=parseInt(a.charAt(y))
bY[z]=parseInt(w.charAt((z<60)?z:119-z),35)&7
R[z]=parseInt(b.charAt(z),35)}}R[BE]=0
d=document
cp=new Function('a','b','return b[0]-a[0]')
function Z(c,U,C,s,e,A,B,K){var z=-1,C=-C,V=8-U,b=Al,r=R,S,E=r[e],g,d
if(C<-400)return[C,s,e]
r[e]=S=r[s]
r[s]=0
if(S)G[V][G[V].length]=[S,e]
if(S-U==1&&r[e+Ds[U>>3]]>15){r[e]+=4}if(S-U==6&&(s-e==2||e-s==2)){g=s-4+(s<e)*7
d=(s+e)>>1
r[g]=0
r[d]=U+2}var L=Pz(U,K,C),N=L.length,n
if(N){if(c){L.sort(cp)
c--
var i=L[0],j=i[1],k=i[2],t
b=-Z(c,V,i[0],j,k,-B,-A,i[3])[0]
for(z=1;z<N;z++){if(b>A)A=b
n=L[z]
t=-Z(c,V,n[0],n[1],n[2],-A-1,-A,n[3])[0]
if((t>A)&&(t<B))t=-Z(c,V,n[0],n[1],n[2],-B,-t,n[3])[0]
if(t>b){b=t
j=n[1]
k=n[2]
if(t>A)A=t
if(b>B)break}}}else{b=Al
while(--N&&B>b){if(L[N][0]>b){b=L[N][0]}}}}else{J=c+1}if(g){r[g]=U+2
r[d]=0}r[s]=S
r[e]=E
G[V].length--
return[b,j,k]}function Sf(c,U,s,e,K){var E=R[e],S=R[e]=R[s]
R[s]=0
H()
U=Z(c,U,0,BE,BE,Al,Bt,K)
R[s]=S
R[e]=E
return U[0]}function mv(s,e,b){var E=R[e],S=R[s],a=S&7,u=M>>3,c=0,t=0,z=0,p
if(!M){H()
p=Pz(M,K,0)
for(;z<p.length;z++){t=t||(s==p[z][1]&&e==p[z][2])}
if(!t)return 0
if(Sf(0,8-M,s,e,K)>400)return 0}if(Sf(0,M,s,e,K)>400)c=1
var x=s%10,g=e-s,D=Ds[u],t=e%10,n=1+(N>>1)
if(Sf(1,8-M,s,e,K)<-400)J=c+1
if((E&7)==6){J=2;return 0}K=0
if(a==1){if(R[e+D]>15)R[s]+=4-b
if(g==2*D&&(R[e-1]&1||R[e+1]&1))K=s+D
if(!E&&g%10)Sh(e,e-D)}if(s==21+u*70||s==28+u*70)KL[u]&=(x<5)+1
if(e==21+u*70||e==28+u*70)KL[!u]&=(x<5)+1
if(a==6){if(g*g==4)Sh(s-4+(s<e)*7,s+g/2)
KL[u]=0}Sh(s,e)
H()
N++
M=8-M
return 1}
function H(){var z=99,Q
s0=(N<32)?4-(N>>3):(N>64)
G[0]=[]
G[8]=[]
kY=[]
pY=[[],[]]
for(;z>20;z--){a=R[z]
if(a&7)G[a&8][G[a&8].length]=[a,z]
Y[z]=bY[z]*s0
kY[z]=(N>40)||(10-2*bY[z])*s0
Q=pY[1][119-z]=pY[0][z]=PY[z]
if (N<7&&z>40){pY[0][z]=pY[1][119-z]=Q+(Math.random()*Y[z])|1
Y[24]=Y[94]=29}}}function Pz(U,K,b){
var W,X,h,E,a,v,n,k=-1,u=U>>3,V=U^8,D=Ds[u],w=[],m,T,p=pY[u],H,d=KL[u],z,c,g,e=G[U],f=e.length,B=R,J=j
for (z=0;z<f;z++){W=e[z][1]
a=B[W]
if (e[z][0]==a){a&=7
if(a>1){c=a==6
H=c?kY:Y
T=b-H[W]
n=MV[a]
if(a==3||c){for(v=0;v<8;){X=W+n[v++]
E=B[X]
if(!E||(E&24)==V){w[++k]=[T+J[E]+H[X],W,X]}}if(c&&d){
if(d&1&&!(B[W-1]+B[W-2]+B[W-3])&&CH(W-2,V,D,-1))
w[++k]=[T+11,W,W-2]
if(d&2&&!(B[W+1]+B[W+2])&&CH(W,V,D,1))w[++k]=[T+12,W,W+2]}}else{g=n.length
for(v=0;v<g;){E=0
m=n[v++]
X=W
while(!E){X+=m
E=B[X]
if(!E||(E&24)==V){w[++k]=[T+J[E]+H[X],W,X]}}}}}else{T=b-p[W]
X=W+D
if(!B[X]){w[++k]=[T+p[X],W,X]
if(!p[W]&&(!B[X+D])){w[++k]=[T+p[X+D],W,X+D,X]}}if(K&&(K==X+1||K==X-1))w[++k]=[T+p[X],W,K]
for(h=X-1;h<X+2;h+=2){E=B[h]+U
if(E&7&&E&8){w[++k]=[T+J[E]+p[h],W,h]}}}}}return w}
function CH(W,V,D,T){var X,E,x,m,S=W+3,a=D+2,k=MV[3],B=R
for(;W<S;W++){for(m=D-2;++m<a;){E=B[W+m]
if(E&&(E&8)==V&&((E&8)==1||(E&7)==6))return 0
E=0
X=W
while(!E){X+=m
E=B[X]
if((E==V+2+(m!=D)*2)||E==V+5)return 0}}for(z=0;z<8;)if(B[W+k[z++]]-V==3)return 0}E=0
W-=3
while(!E){W-=T
E=B[W]
if(E==V+2||E==V+5)return 0}return 1}function B(Q){var a=R[Q]
if(J)return
if(q==Q&&I){
O(q,I,1)
I=0
return}if(a&&M==(a&8)){if(I)O(q,I,1)
I=a
q=Q
O(q,0,1)
return}if(I){if(mv(q,Q,d.FF.h.selectedIndex,y)){I=0
if(!J){var t=Z(2,M,0,BE,BE,Al,Bt,K)
mv(t[1],t[2],0)}}}}function Sh(s,e){var a=R[s]
R[e]=a
R[s]=0
O(s,0,1)
O(e,a,1)}function Rf(a){P=a
for(var z=0;z<BE;z++)if(R[z]<16)O(z,R[z],1)}function O(x,y,z){if(z)x="i"+(x)
d.images[x].src=y+'.gif'}h='<table cellpadding=4 class=t>'
for(y=90;y>10;y-=10){h+="<tr>"
for(x=0;x<10;x++){z=y+x
if(x&&x<9){h+=('<td class='+(x+(y/10)&1?'b':'w')+'><a href="#" onclick="B(P?119-'+z+':'+z+');
return false"><img src=0.gif width=7 height=40 border=0><img src=0.gif width=25 height=40 name=i'+z+'
border=0><img src=0.gif width=7 height=40 border></a></td>\n')}}h+='</tr>\n'}h+='</table>'
d.write(h)
Rf(0)</SCRIPT>

Peter Thiel and the Singularity

Thursday, September 4th, 2008

I was at the DreamIt funding day demos today (which was great) and I was talking with some of the guys about the Singularity. Most of them didn’t know what it is, but a few of them did. Still, the ones that knew about it didn’t totally buy into it - they said it hadn’t really made an impact on their day-to-day decisions. I told them that it has totally changed my thinking.
And so now I am reading this article about Peter Thiel, and “the Paypal Mafia”, and I read this quote from Elon Musk:

“Peter, Max, and I are not directly aligned philosophically,” he says. “Peter’s philosophy is pretty odd. It’s not normal. He’s a contrarian from an investing standpoint and thinks a lot about the singularity. I’m much less excited about that. I’m pro-human.”

That made me laugh.
Peter also has a hedge fund, Clarium Capital, which is doing really well. He’s also a tournament chess master (currently rated 2287 USCF and 2199 FIDE). He hasn’t really played recently - his last big match was the 104th US Open in LA 5 years ago - but it looks like he only played two games and then dropped out (he won both of the games).
The oldest tournament record that USCF has for Thiel is the Mc Ilrath Memorial in Burlingame, CA way back in 1992. He went 5-0 to take clear 1st place.
By the way, I totally agree with his view of chess:

“Taken too far, chess can become an alternate reality in which one loses sight of the real world,” he says. “My chess ability was roughly at the limit. Had I become any stronger, there would have been some massive tradeoffs with success in other domains in life.”

I think it is a great tool for analytical thinking and strategy training. But it takes a lot of time and thought and eventually you need to be productive and put away the pieces and apply that training. Plus, there’s no money in it. And computers are way better. But it is great for children and young adults and it is a very beautiful game.

Before making a move, white has a 52.8% probablity of winning in chess

Monday, July 21st, 2008

At least according to Rybka 3.0, the best chess player ever in the history of the game, who is rated well over 3000.

Why using your intuition is the most reasonable thing to do

Friday, July 18th, 2008

Some things are just too complex for the human brain. Take the game of chess, for example. The estimated number of possible games of chess is 10^123. Just to give you an idea of how much that is, there is an estimated 3.2 x 10^78 atoms in the universe. This means there are about 10^44 unique chess games for every atom in the universe. The best human players only think ahead three to five moves on average. If a player wants to compete in the upper echelons of chess, they must use their intuition.
And chess is SIMPLE compared to the stock market.

Attention: this is only half of a blog post. You must be a member to read the full post. If you are interested in subscribing to uglychart.com, send me an email with your address, and my staff will mail you a pamphlet with details about what membership to uglychart.com means, along with an application form. Membership is FREE! (Only 5 spots available).

Gary Kasparov and the Flying Penis

Sunday, June 1st, 2008

Gary Kasparov’s press conference is interrupted by a flying penis.

According to the Moscow Times, the prank was staged by “a couple of pro-Kremlin Young Russia activists.”

Bobby Fischer’s Last Words

Monday, April 21st, 2008

This article about Bobby Fischer in the timesonline is interesting, about a bunch of people who are squabbling over his estate, including one woman who claims her child is also Bobby Fischer’s daughter. I found the most interesting parts were some quotes from Bobby’s friend/psychiatrist Magnus Skulason:

“I never asked him questions about himself, you must understand. He became very irritated if you did that,” Skulason begins tentatively. “But he once asked me about the origins of psychiatric illness. I think he realised there was something missing in himself. In a way he was searching like a young boy, still trying to understand himself and the world.”

“He told me he kept having the same dream. But he never wanted to talk about it. It seemed memories were trying to come out,” says the psychiatrist.

“I don’t believe Bobby was badly treated as a boy. But he was lonely. He missed having a father, and his mother was often outside the home.”

“Without basic trust, a person relies far too much on such primitive defences as building walls, blaming others and projecting negative feelings onto them.” Fischer himself once said of his aggression: “Those who don’t have fathers become like wolves.”

His last words were: “Nothing is as healing as the human touch.”

Computers Beat Go Master

Tuesday, April 15th, 2008

This is the beginning of the end for Go:

During the Go Tournament in Paris, staged between 22 and 24 March 2008 by the French Go Federation (FFG), the MoGo artificial intelligence (IA) engine developed by INRIA - the French National Institute for Research in Computer Science and Control - running on a Bull NovaScale supercomputer, won a 9×9 game of Go against professional 5th DAN Catalin Taranu. This was the first ever officially sanctioned ‘non blitz’ victory of a ‘machine’ over a Go Master.

Grandmaster One-Minute Chess

Sunday, April 13th, 2008

Maxim Dlugy and Hikaru Nakamura:

Bobby Fischer on “I’ve Got a Secret”

Saturday, February 23rd, 2008