Tic-Tac-Toe
This classic game challenges you to create a script that can outsmart its opponent and achieve three in a row.
Battle Scripts lets you learn to code by writing autonomous players for classic games. Pick a game, learn the rules, then write a program that plays it. Forge it in the browser, test it instantly, and see how it stacks up against everyone else in the Arena.
Step 1
Tic-Tac-Toe or Hide and Sink. Read the rules and what your script has to decide.
Step 2
Write Python or Java in the browser and run it against the Codecraft opponent as often as you like.
Step 3
Freeze a version you're happy with. That snapshot is what other people challenge.
Step 4
Battle other players' scripts, watch the game back turn by turn, and climb the leaderboard.
This classic game challenges you to create a script that can outsmart its opponent and achieve three in a row.
Based on the classic Battleship game, Hide and Sink requires strategic thinking and cunning to locate and sink your opponent's ships.
Every active script anyone has entered. Pick an opponent, put one of yours up against it, and watch the game play out move by move.
Go to the ArenaEvery day the top 100 of each leaderboard are drawn into a bracket and fought to a champion. No entry needed — if you're on the board, you're in it.
See the latest results| # | Script | Author | Pairing | Win rate |
|---|---|---|---|---|
| 1 | Swift Aqua Telescope | Cheery Quail | PythonTic-Tac-Toe | 100% (3/3) |
| 2 | Smart? | Sam | JavaHide and Sink | 100% (3/3) |
| 3 | TicTacToe-1 | M Gibson | PythonTic-Tac-Toe | 100% (1/1) |
| 4 | Zany Lavender Antelope | EssaHT | JavaTic-Tac-Toe | 100% (1/1) |
| 5 | Gentle Magenta Robot | Boundless Alpaca | PythonTic-Tac-Toe | 100% (1/1) |
| 6 | Thunderous Turquoise Ferret | Edwin Disang | PythonTic-Tac-Toe | 100% (1/1) |
| 7 | Marta's Tic Tac Toe | Marta Deese | PythonTic-Tac-Toe | 100% (1/1) |
| 8 | Rugged Velvet Comet | Gulley Potoo | PythonTic-Tac-Toe | 100% (1/1) |
| 9 | Cozy Crimson Volcano | Edwin Disang | PythonTic-Tac-Toe | 100% (1/1) |
| 10 | Honest Pink Noodle | SALCEDOG | JavaTic-Tac-Toe | 100% (3/3) |
| 11 | Bombastic Random Boats | Juan @ Codecraft Works | JavaHide and Sink | 99% (171/173) |
| 12 | Happy Amber Pelican | EssaHT | PythonTic-Tac-Toe | 87% (13/15) |
| 13 | Quirky Magenta Planet | ICEVA | JavaTic-Tac-Toe | 86% (6/7) |
| 14 | Jumpy Lavender Telescope | L&CIndustries | PythonTic-Tac-Toe | 86% (6/7) |
| 15 | Noble Apricot Walrus | HudsonHT | PythonTic-Tac-Toe | 82% (9/11) |
| 16 | Roaring Navy Planet | TeddHT | PythonTic-Tac-Toe | 80% (8/10) |
| 17 | Thunderous Ruby Dragonfly | Granite Wallaby | PythonTic-Tac-Toe | 75% (3/4) |
| 18 | New Game | Spectacular Potato | BlocklyTic-Tac-Toe | 74% (20/27) |
| 19 | CCPC Blocky 🥷🏾 1 | Gilberto Creque | PythonTic-Tac-Toe | 73% (194/265) |
| 20 | final2 | BrittanyHT | PythonTic-Tac-Toe | 72% (13/18) |
| 21 | Fancy Pearl Giraffe | Bustling Pika | PythonTic-Tac-Toe | 67% (2/3) |
| 22 | Mellow Velvet Magnet | Edwin Disang | PythonTic-Tac-Toe | 67% (2/3) |
| 23 | Eager Navy Yak | Trailing Wallaby | JavaHide and Sink | 67% (6/9) |
| 24 | Gentle Emerald Satellite | Edwin Disang | PythonTic-Tac-Toe | 67% (2/3) |
| 25 | Noble Azure Kite | BRISTOLA | JavaTic-Tac-Toe | 67% (4/6) |
| 26 | Dreamy Jade Dolphin | Boundless Alpaca | PythonTic-Tac-Toe | 67% (2/3) |
| 27 | Glitch | MECKB | JavaTic-Tac-Toe | 60% (3/5) |
| 28 | K.O.'s Player | Codecraft Works | PythonTic-Tac-Toe | 60% (3/5) |
| 29 | Robsons Tic Tac to | CARVAJALR | JavaTic-Tac-Toe | 60% (3/5) |
| 30 | Default Blocks but with Functions | Juan @ Codecraft Works | BlocklyTic-Tac-Toe | 58% (341/593) |
| 31 | Happy Ruby Quokka | Estuary Jay | PythonTic-Tac-Toe | 50% (1/2) |
| 32 | Peppy Maroon Noodle | Highland Kingfisher | PythonTic-Tac-Toe | 50% (2/4) |
| 33 | Speedy Peach Iguana | d j | PythonTic-Tac-Toe | 50% (1/2) |
| 34 | Sparkly Velvet Crayon | Seaside Godwit | PythonTic-Tac-Toe | 50% (1/2) |
| 35 | Loyal Copper Beetle | River Finch | JavaHide and Sink | 50% (3/6) |
| 36 | Gentle Cobalt Narwhal | Edwin Disang | PythonTic-Tac-Toe | 50% (1/2) |
| 37 | Gib TicTacToe | M Gibson | PythonTic-Tac-Toe | 50% (2/4) |
| 38 | final | BrittanyHT | PythonTic-Tac-Toe | 50% (1/2) |
| 39 | Alyssa | AlyssaHT | PythonTic-Tac-Toe | 50% (1/2) |
| 40 | Jumpy Maroon Galaxy | MECKB | JavaTic-Tac-Toe | 50% (2/4) |
| 41 | THIS | AlyssaHT | PythonTic-Tac-Toe | 50% (1/2) |
| 42 | Merry Azure Blossom | Edwin Disang | PythonTic-Tac-Toe | 43% (3/7) |
| 43 | Chaotic Random Toffees | Juan @ Codecraft Works | JavaTic-Tac-Toe | 43% (3/7) |
| 44 | Aaden's Tic Tac Toe | BRISTOLA | JavaTic-Tac-Toe | 42% (5/12) |
| 45 | BattleBot | Michelle Delahoussaye | BlocklyTic-Tac-Toe | 41% (241/584) |
| 46 | Cosmic Pink Robot | Estuary Jay | PythonTic-Tac-Toe | 33% (1/3) |
| 47 | Cheerful Emerald Dragon | Harbor Gull | JavaHide and Sink | 33% (2/6) |
| 48 | Zippy Scarlet Starfish | BryanHT | PythonTic-Tac-Toe | 33% (1/3) |
| 49 | Bright Indigo Rainbow | AlyssaHT | PythonTic-Tac-Toe | 33% (1/3) |
| 50 | marissa | Crisp Skylark | PythonTic-Tac-Toe | 27% (3/11) |
| 51 | Scary Random Snakes | Juan @ Codecraft Works | PythonTic-Tac-Toe | 26% (65/248) |
| 52 | Epic Emerald Falcon | BryanHT | PythonTic-Tac-Toe | 25% (1/4) |
| 53 | Jazzy Ruby Pelican | BryanHT | PythonTic-Tac-Toe | 25% (2/8) |
| 54 | Jumpy Silver Marble | BryanHT | PythonTic-Tac-Toe | 22% (2/9) |
| 55 | Whimsical Olive Dragon | Aaron Leblanc | PythonTic-Tac-Toe | 20% (1/5) |
| 56 | Galactic Violet Cactus | Tyler Campbell | JavaTic-Tac-Toe | 17% (2/12) |
| 57 | Lucky Tangerine Turtle | JamesHT | PythonTic-Tac-Toe | 14% (1/7) |
| 58 | Rugged Mint Yak | LANDRUMS | JavaTic-Tac-Toe | — (0/0) |
| 59 | Friendly Maroon Gecko | Gulley Potoo | PythonTic-Tac-Toe | — (0/0) |
| 60 | cheese | Gulley Potoo | PythonTic-Tac-Toe | — (0/0) |
| 61 | Giant Apricot Seahorse | Boundless Alpaca | PythonTic-Tac-Toe | — (0/0) |
| 62 | Epic Crimson Bumblebee | Koren Olson | PythonTic-Tac-Toe | — (0/0) |
| 63 | Final | MECKB | JavaTic-Tac-Toe | 0% (0/1) |
| 64 | Thunderous Periwinkle Cactus | Tumbling Marmot | PythonTic-Tac-Toe | 0% (0/1) |
| 65 | Shiny Maroon Cricket | Bustling Pika | PythonTic-Tac-Toe | 0% (0/1) |
| 66 | Shoot at 0, 0 <script>alert(1)</script> | Sam | JavaHide and Sink | 0% (0/1) |
| 67 | Hopeful Crimson Beacon | AlyssaHT | PythonTic-Tac-Toe | — (0/0) |
| 68 | Witty Ivory Crayon | Boundless Alpaca | PythonTic-Tac-Toe | — (0/0) |
| 69 | Plucky Lavender Pangolin | Gulley Potoo | PythonTic-Tac-Toe | 0% (0/2) |
| 70 | Fluffy Periwinkle Planet | Ember Marten | PythonTic-Tac-Toe | 0% (0/2) |
| 71 | Twirly Violet Hedgehog | Koren Olson | PythonTic-Tac-Toe | — (0/0) |
| 72 | Smart? | Sam | JavaHide and Sink | — (0/0) |
| 73 | Friendly Jade Seahorse | Boundless Alpaca | PythonTic-Tac-Toe | — (0/0) |
| 74 | Quirky Peach Parrot | Grove Shearwater | PythonTic-Tac-Toe | 0% (0/1) |
| 75 | Quiet Ruby Sequoia | TeddHT | PythonTic-Tac-Toe | 0% (0/1) |
| 76 | Spiffy Silver Comet | Estuary Jay | PythonTic-Tac-Toe | — (0/0) |
| 77 | Mellow Apricot Meerkat | Granite Wallaby | PythonTic-Tac-Toe | 0% (0/5) |
| 78 | Lively Magenta Crayon | Sam | JavaHide and Sink | — (0/0) |
| 79 | An attempt 2 | Moonlit Marten | PythonTic-Tac-Toe | — (0/0) |
| 80 | Vivid Pink Giraffe | Gilberto Creque | JavaHide and Sink | 0% (0/169) |
| 81 | Glowing Bronze Jellyfish | AlyssaHT | PythonTic-Tac-Toe | — (0/0) |
| 82 | Smart? 2 | Sam | JavaHide and Sink | 0% (0/1) |
| 83 | Jazzy Jade Lobster | d j | PythonTic-Tac-Toe | — (0/0) |
| 84 | Snappy Golden Chipmunk | Keen Numbat | JavaTic-Tac-Toe | — (0/0) |
| 85 | Peppy Navy Waterfall | Gilberto Creque | PythonTic-Tac-Toe | — (0/0) |
| 86 | Hopeful Lavender Jellyfish | Windy Coyote | PythonTic-Tac-Toe | — (0/0) |
| 87 | Electric Copper Heron | Keen Numbat | PythonTic-Tac-Toe | — (0/0) |
| 88 | Polished Cobalt Crayon | Grove Shearwater | PythonTic-Tac-Toe | — (0/0) |
| 89 | Fearless Sapphire Meerkat | Gulley Potoo | PythonTic-Tac-Toe | 0% (0/1) |
| 90 | Cozy Peach Pinecone | BrittanyHT | PythonTic-Tac-Toe | 0% (0/1) |
| 91 | Cozy Plum Falcon | Windy Coyote | PythonTic-Tac-Toe | 0% (0/3) |
| 92 | Hasty Jade Meerkat | AlyssaHT | PythonTic-Tac-Toe | 0% (0/1) |
| 93 | Whimsical Lemon Zeppelin | Bustling Pika | PythonTic-Tac-Toe | — (0/0) |
| 94 | Kind Ruby Gecko | Boundless Alpaca | PythonTic-Tac-Toe | — (0/0) |
| 95 | Helpful Indigo Comet | Crisp Skylark | PythonTic-Tac-Toe | 0% (0/1) |
| 96 | Soaring Velvet Octopus | Chipner.AnthonyO@Kennedy Middle | PythonTic-Tac-Toe | 0% (0/2) |
| 97 | Dazzling Lemon Lighthouse | Edwin Disang | PythonTic-Tac-Toe | — (0/0) |
| 98 | Bright Silver Tuba | WIGGALLM | JavaTic-Tac-Toe | — (0/0) |
| 99 | Plucky Peach Wombat | d j | PythonTic-Tac-Toe | 0% (0/2) |
| 100 | Gentle Navy Waterfall | d j | PythonTic-Tac-Toe | — (0/0) |
| # | Script | Author | Win rate |
|---|---|---|---|
| 1 | Smart? | Sam | 100% (3/3) |
| 2 | Bombastic Random Boats | Juan @ Codecraft Works | 99% (171/173) |
| 3 | Eager Navy Yak | Trailing Wallaby | 67% (6/9) |
| 4 | Loyal Copper Beetle | River Finch | 50% (3/6) |
| 5 | Cheerful Emerald Dragon | Harbor Gull | 33% (2/6) |
| 6 | Shoot at 0, 0 <script>alert(1)</script> | Sam | 0% (0/1) |
| 7 | Smart? | Sam | — (0/0) |
| 8 | Lively Magenta Crayon | Sam | — (0/0) |
| 9 | Vivid Pink Giraffe | Gilberto Creque | 0% (0/169) |
| 10 | Smart? 2 | Sam | 0% (0/1) |
| 11 | Actually, you know what, don't even put in a position | Sam | 0% (0/2) |
| # | Script | Author | Win rate |
|---|---|---|---|
| 1 | Swift Aqua Telescope | Cheery Quail | 100% (3/3) |
| 2 | TicTacToe-1 | M Gibson | 100% (1/1) |
| 3 | Gentle Magenta Robot | Boundless Alpaca | 100% (1/1) |
| 4 | Thunderous Turquoise Ferret | Edwin Disang | 100% (1/1) |
| 5 | Marta's Tic Tac Toe | Marta Deese | 100% (1/1) |
| 6 | Rugged Velvet Comet | Gulley Potoo | 100% (1/1) |
| 7 | Cozy Crimson Volcano | Edwin Disang | 100% (1/1) |
| 8 | Happy Amber Pelican | EssaHT | 87% (13/15) |
| 9 | Jumpy Lavender Telescope | L&CIndustries | 86% (6/7) |
| 10 | Noble Apricot Walrus | HudsonHT | 82% (9/11) |
| 11 | Roaring Navy Planet | TeddHT | 80% (8/10) |
| 12 | Thunderous Ruby Dragonfly | Granite Wallaby | 75% (3/4) |
| 13 | CCPC Blocky 🥷🏾 1 | Gilberto Creque | 73% (194/265) |
| 14 | final2 | BrittanyHT | 72% (13/18) |
| 15 | Fancy Pearl Giraffe | Bustling Pika | 67% (2/3) |
| 16 | Mellow Velvet Magnet | Edwin Disang | 67% (2/3) |
| 17 | Gentle Emerald Satellite | Edwin Disang | 67% (2/3) |
| 18 | Dreamy Jade Dolphin | Boundless Alpaca | 67% (2/3) |
| 19 | K.O.'s Player | Codecraft Works | 60% (3/5) |
| 20 | Happy Ruby Quokka | Estuary Jay | 50% (1/2) |
| 21 | Peppy Maroon Noodle | Highland Kingfisher | 50% (2/4) |
| 22 | Speedy Peach Iguana | d j | 50% (1/2) |
| 23 | Sparkly Velvet Crayon | Seaside Godwit | 50% (1/2) |
| 24 | Gentle Cobalt Narwhal | Edwin Disang | 50% (1/2) |
| 25 | Gib TicTacToe | M Gibson | 50% (2/4) |
| 26 | final | BrittanyHT | 50% (1/2) |
| 27 | Alyssa | AlyssaHT | 50% (1/2) |
| 28 | THIS | AlyssaHT | 50% (1/2) |
| 29 | Merry Azure Blossom | Edwin Disang | 43% (3/7) |
| 30 | Cosmic Pink Robot | Estuary Jay | 33% (1/3) |
| 31 | Zippy Scarlet Starfish | BryanHT | 33% (1/3) |
| 32 | Bright Indigo Rainbow | AlyssaHT | 33% (1/3) |
| 33 | marissa | Crisp Skylark | 27% (3/11) |
| 34 | Scary Random Snakes | Juan @ Codecraft Works | 26% (65/248) |
| 35 | Epic Emerald Falcon | BryanHT | 25% (1/4) |
| 36 | Jazzy Ruby Pelican | BryanHT | 25% (2/8) |
| 37 | Jumpy Silver Marble | BryanHT | 22% (2/9) |
| 38 | Whimsical Olive Dragon | Aaron Leblanc | 20% (1/5) |
| 39 | Lucky Tangerine Turtle | JamesHT | 14% (1/7) |
| 40 | Friendly Maroon Gecko | Gulley Potoo | — (0/0) |
| 41 | cheese | Gulley Potoo | — (0/0) |
| 42 | Giant Apricot Seahorse | Boundless Alpaca | — (0/0) |
| 43 | Epic Crimson Bumblebee | Koren Olson | — (0/0) |
| 44 | Thunderous Periwinkle Cactus | Tumbling Marmot | 0% (0/1) |
| 45 | Shiny Maroon Cricket | Bustling Pika | 0% (0/1) |
| 46 | Hopeful Crimson Beacon | AlyssaHT | — (0/0) |
| 47 | Witty Ivory Crayon | Boundless Alpaca | — (0/0) |
| 48 | Plucky Lavender Pangolin | Gulley Potoo | 0% (0/2) |
| 49 | Fluffy Periwinkle Planet | Ember Marten | 0% (0/2) |
| 50 | Twirly Violet Hedgehog | Koren Olson | — (0/0) |
| 51 | Friendly Jade Seahorse | Boundless Alpaca | — (0/0) |
| 52 | Quirky Peach Parrot | Grove Shearwater | 0% (0/1) |
| 53 | Quiet Ruby Sequoia | TeddHT | 0% (0/1) |
| 54 | Spiffy Silver Comet | Estuary Jay | — (0/0) |
| 55 | Mellow Apricot Meerkat | Granite Wallaby | 0% (0/5) |
| 56 | An attempt 2 | Moonlit Marten | — (0/0) |
| 57 | Glowing Bronze Jellyfish | AlyssaHT | — (0/0) |
| 58 | Jazzy Jade Lobster | d j | — (0/0) |
| 59 | Peppy Navy Waterfall | Gilberto Creque | — (0/0) |
| 60 | Hopeful Lavender Jellyfish | Windy Coyote | — (0/0) |
| 61 | Electric Copper Heron | Keen Numbat | — (0/0) |
| 62 | Polished Cobalt Crayon | Grove Shearwater | — (0/0) |
| 63 | Fearless Sapphire Meerkat | Gulley Potoo | 0% (0/1) |
| 64 | Cozy Peach Pinecone | BrittanyHT | 0% (0/1) |
| 65 | Cozy Plum Falcon | Windy Coyote | 0% (0/3) |
| 66 | Hasty Jade Meerkat | AlyssaHT | 0% (0/1) |
| 67 | Whimsical Lemon Zeppelin | Bustling Pika | — (0/0) |
| 68 | Kind Ruby Gecko | Boundless Alpaca | — (0/0) |
| 69 | Helpful Indigo Comet | Crisp Skylark | 0% (0/1) |
| 70 | Soaring Velvet Octopus | Chipner.AnthonyO@Kennedy Middle | 0% (0/2) |
| 71 | Dazzling Lemon Lighthouse | Edwin Disang | — (0/0) |
| 72 | Plucky Peach Wombat | d j | 0% (0/2) |
| 73 | Gentle Navy Waterfall | d j | — (0/0) |
| 74 | Jumpy Plum Snail | Moonlit Marten | — (0/0) |
| 75 | Cheerful Jade Falcon | Edwin Disang | — (0/0) |
| 76 | Gentle Plum Salamander | Keen Numbat | — (0/0) |
| 77 | Proud Olive Galaxy | Granite Wallaby | — (0/0) |
| 78 | Speedy Silver Meteor | Edwin Disang | — (0/0) |
| 79 | An attempt | Moonlit Marten | — (0/0) |
| 80 | Daring Jade Cactus | Highland Kingfisher | — (0/0) |
| 81 | Polished Crimson Sparrow | Bustling Pika | — (0/0) |
| 82 | Rustic Coral Waffle | Cheery Quail | — (0/0) |
| 83 | Sunny Olive Heron | Edwin Disang | — (0/0) |
| 84 | Glowing Pink Dragonfly | Edwin Disang | — (0/0) |
| 85 | Sparkly Periwinkle Cricket | Moonlit Marten | — (0/0) |
| 86 | Helpful Magenta Beacon | Seaside Godwit | 0% (0/1) |
| 87 | Toasty Cobalt Antelope | Edwin Disang | — (0/0) |
| 88 | Roaring Emerald Anchor | Windy Coyote | 0% (0/2) |
| 89 | Lucky Lemon Blossom | BryanHT | 0% (0/3) |
| # | Script | Author | Win rate |
|---|---|---|---|
| 1 | Zany Lavender Antelope | EssaHT | 100% (1/1) |
| 2 | Honest Pink Noodle | SALCEDOG | 100% (3/3) |
| 3 | Quirky Magenta Planet | ICEVA | 86% (6/7) |
| 4 | Noble Azure Kite | BRISTOLA | 67% (4/6) |
| 5 | Glitch | MECKB | 60% (3/5) |
| 6 | Robsons Tic Tac to | CARVAJALR | 60% (3/5) |
| 7 | Jumpy Maroon Galaxy | MECKB | 50% (2/4) |
| 8 | Chaotic Random Toffees | Juan @ Codecraft Works | 43% (3/7) |
| 9 | Aaden's Tic Tac Toe | BRISTOLA | 42% (5/12) |
| 10 | Galactic Violet Cactus | Tyler Campbell | 17% (2/12) |
| 11 | Rugged Mint Yak | LANDRUMS | — (0/0) |
| 12 | Final | MECKB | 0% (0/1) |
| 13 | Snappy Golden Chipmunk | Keen Numbat | — (0/0) |
| 14 | Bright Silver Tuba | WIGGALLM | — (0/0) |
| 15 | Peppy Pink Ukulele | Keen Numbat | — (0/0) |
| # | Script | Author | Win rate |
|---|---|---|---|
| 1 | New Game | Spectacular Potato | 74% (20/27) |
| 2 | Default Blocks but with Functions | Juan @ Codecraft Works | 58% (341/593) |
| 3 | BattleBot | Michelle Delahoussaye | 41% (241/584) |