<?xml version="1.0" encoding="UTF-8"?> <feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"> <title>Challenge: Tic-tac-toe</title> <link rel="self" href="https://portal.smartbuilder.com/c/message_boards/find_thread?p_l_id=&amp;threadId=652514" /> <subtitle>Challenge: Tic-tac-toe</subtitle> <id>https://portal.smartbuilder.com/c/message_boards/find_thread?p_l_id=&amp;threadId=652514</id> <updated>2026-06-09T17:39:34Z</updated> <dc:date>2026-06-09T17:39:34Z</dc:date> <entry> <title>RE: Challenge: Tic-tac-toe</title> <link rel="alternate" href="https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=689115" /> <author> <name>Marcel Ooms</name> </author> <id>https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=689115</id> <updated>2026-06-08T12:59:21Z</updated> <published>2026-06-08T12:59:21Z</published> <summary type="html">Hi Smartbuilder community,&lt;br /&gt;&lt;br /&gt;I had some time again to continue this project. You can see the project here: &lt;a href="https&amp;#x3a;&amp;#x2f;&amp;#x2f;mooms&amp;#x2e;nl&amp;#x2f;projects&amp;#x2f;tictactoe&amp;#x2f;"&gt;https://mooms.nl/projects/tictactoe/&lt;/a&gt;&lt;br /&gt;- improved the computers best move (although still not super clean code, it does work pretty well and is hard to beat)&lt;br /&gt;- added the design&lt;br /&gt;- added the players&amp;#039; name(s) function and ability to choose the difficulty level&lt;br /&gt;- added a multi player &lt;br /&gt;&lt;br /&gt;I&amp;#039;m curious what you guys think of it. Although not the most interesting project, it was a very good challenge to teach myself some smartbuilder coding and ideas about game making. If you have any ideas or comments, I&amp;#039;m very happy to hear them &lt;img alt="emoticon" src="https://portal.smartbuilder.com/html/themes/classic/images/emoticons/happy.gif" &gt;. Or if you want to check out the project file, just leave a reply.&lt;br /&gt;&lt;br /&gt;Cheers&lt;br /&gt;&lt;br /&gt;Marcel</summary> <dc:creator>Marcel Ooms</dc:creator> <dc:date>2026-06-08T12:59:21Z</dc:date> </entry> <entry> <title>RE: Challenge: Tic-tac-toe</title> <link rel="alternate" href="https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=673466" /> <author> <name>Marcel Ooms</name> </author> <id>https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=673466</id> <updated>2025-12-23T11:58:30Z</updated> <published>2025-12-23T11:58:30Z</published> <summary type="html">Hi Smartbuilder Community,&lt;br /&gt;&lt;br /&gt;It took some time, but I finally had time to make an update on the game again. It is a big change, mainly on switching to lists and making a start on finding the best move for the computer. Here are some of my findings and remarks&lt;br /&gt;- I found a way to make a list quickly using the split text block&lt;br /&gt;- Everything is now made with the &amp;#039;procedure&amp;#039; object as Navdeep advised and showed in &lt;a href="https&amp;#x3a;&amp;#x2f;&amp;#x2f;share&amp;#x2e;smartbuilder&amp;#x2e;com&amp;#x2f;public&amp;#x2f;videotutorials&amp;#x2f;Procedures&amp;#x2e;mp4"&gt;this tutorial.&lt;/a&gt; This gives a cleaner overview and is perfect for small games.&lt;br /&gt;&lt;a href="https&amp;#x3a;&amp;#x2f;&amp;#x2f;share&amp;#x2e;smartbuilder&amp;#x2e;com&amp;#x2f;public&amp;#x2f;videotutorials&amp;#x2f;Procedures&amp;#x2e;mp4"&gt;&lt;/a&gt;- We use lists now instead of the inputtext. Mainly because it is easier to check the lenght of the lists.&lt;br /&gt;- I had trouble with the &amp;#039;is thing in list&amp;#039; block, so I used the &amp;#039;is everything in list&amp;#039;. But still not sure what I did wrong. Maybe because a list can not be a &amp;#039;thing&amp;#039;?&lt;br /&gt;- I also had trouble transfering the only number on a list to another. That&amp;#039;s why I used the &amp;#039;pick random&amp;#039; on lists of 1 item long. I don&amp;#039;t understand why I couldn&amp;#039;t use the &amp;#039;copy list&amp;#039; function or just connect the two variables directly to eachother.&lt;br /&gt;- Is it possible to have the possible lists (vertical, horizontal &amp;amp; diagonal) in a map which could iterate the checking procedure? Just to make it more tidy instead of adding all possibilities (checking best move, checking best defence, checking if game finished etc) manually?&lt;br /&gt;&lt;br /&gt;I still have a few things I want to improve. But all tips, tricks and ideas on improving or optimizing are welcome ofcoure. I would love to hear everybody&amp;#039;s ideas on how to program this game &lt;img alt="emoticon" src="https://portal.smartbuilder.com/html/themes/classic/images/emoticons/happy.gif" &gt;</summary> <dc:creator>Marcel Ooms</dc:creator> <dc:date>2025-12-23T11:58:30Z</dc:date> </entry> <entry> <title>RE: Challenge: Tic-tac-toe</title> <link rel="alternate" href="https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=653235" /> <author> <name>Navdeep Dhillon</name> </author> <id>https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=653235</id> <updated>2025-05-30T21:16:53Z</updated> <published>2025-05-30T21:15:44Z</published> <summary type="html">Hi Marcel,&lt;br /&gt;This is really neat! Thanks for creating this, and sharing your file.&lt;br /&gt;&lt;br /&gt;I have a couple of efficiencies that I can show you regarding tag lists, which will make your actions smaller (but more dense/complex). Here&amp;#039;s a video showing those - &lt;a href="https&amp;#x3a;&amp;#x2f;&amp;#x2f;app&amp;#x2e;screencast&amp;#x2e;com&amp;#x2f;OiRYXDf7ZHuXj"&gt;https://app.screencast.com/OiRYXDf7ZHuXj&lt;br /&gt;&lt;br /&gt;&lt;/a&gt;Overall, you&amp;#039;re correct, I think the hardest part is getting the computer to think of the best next move. &lt;strong&gt;However&lt;/strong&gt;, I believe that if everyone is playing tic-tac-toe optimally, the game is not actually any fun. The first player always wins or ties, or the second player can always force a draw. So your ComputerPlayer will always force a tie if it&amp;#039;s being smart. So your current approach of randomly selecting a tile, I would argue, is more fun, because the HumanPlayer can actually win. You may want to consider some alternate form of slightly dumbed-down-AI for the ComputerPlayer where it tries to block a three-in-a-rown, but if the HumanPlayer is smart, they will still win. I think this is a common &amp;#034;problem&amp;#034; for video games - making the AI challenging, but not too difficult.&lt;br /&gt;&lt;br /&gt;Here are the rules on how to never lose at tic-tac-toe - &lt;a href="https&amp;#x3a;&amp;#x2f;&amp;#x2f;www&amp;#x2e;youtube&amp;#x2e;com&amp;#x2f;watch&amp;#x3f;v&amp;#x3d;6ZForbaku9c&amp;#x26;ab_channel&amp;#x3d;PinkPencil"&gt;https://www.youtube.com/watch?v=6ZForbaku9c&amp;amp;ab_channel=PinkPencil&lt;/a&gt; (one small mistake in one of the diagrams, but what they&amp;#039;re saying is accurate).</summary> <dc:creator>Navdeep Dhillon</dc:creator> <dc:date>2025-05-30T21:15:44Z</dc:date> </entry> <entry> <title>Challenge: Tic-tac-toe</title> <link rel="alternate" href="https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=652513" /> <author> <name>Marcel Ooms</name> </author> <id>https://portal.smartbuilder.com/c/message_boards/find_message?p_l_id=&amp;messageId=652513</id> <updated>2025-05-24T08:15:10Z</updated> <published>2025-05-24T08:15:10Z</published> <summary type="html">Hi all,&lt;br /&gt;&lt;br /&gt;Just to learn more about smartbuilder functionality and programming, I am trying to build a tic-tac-toe game which &amp;#039;in theory&amp;#039; the computer would never loose. I&amp;#039;m already pretty happy with the base I have so far of how the pieces move and the limited code is uses to get everything working, but am now starting with the computer &amp;#039;intellegence&amp;#039; to see traps and make the best move. Besides that I think there is still some room for optimising the code, like a way to check the item&amp;#039;s index in a list.&lt;br /&gt;&lt;br /&gt;All input from everybody is welcome. As said before, it is just a learning project, so everybody who wants to join, help, share, read along or use it in a project is welcome to. Ideas on possibilities how to do this, code blocks or ways to optimise code are are appreciated and needed for this project to evolve further, and of course help us learn stuff.&lt;br /&gt;&lt;br /&gt;Thanks in advance and looking forward to everybody&amp;#039;s reply &lt;img alt="emoticon" src="https://portal.smartbuilder.com/html/themes/classic/images/emoticons/happy.gif" &gt;</summary> <dc:creator>Marcel Ooms</dc:creator> <dc:date>2025-05-24T08:15:10Z</dc:date> </entry> </feed> 