[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.2187412 [View]
File: 13 KB, 507x462, gameplayer.png [View same] [iqdb] [saucenao] [google]
2187412

Ok, here it is. Note I just typed it in without testing. I won't be embarrassed if there is a mistake there. I also didn't include the simple code to wait opponent possibly making a mistake in optimal-strategy-tie-games as I wanted the simplicity to shine.

I liked this puzzle because (at least 15 years ago) the students of every national team were drilled to do recursive solutions in their sleep and this was nice puzzle to reward creativity.

Waiting for you to post your algorithm in C, python, java, javascript, ruby whatever.

Navigation
View posts[+24][+48][+96]