Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.

Get Started Now!

PYTHON SETTLES BET ABOUT BEST STRATEGY IN CHILDREN’S BOARD GAME

Source – https://hackaday.com/

Simulating a tabletop game can be done for several reasons: to play the game digitally, to create computer opponent(s), or to prove someone wrong. In [Everett]’s case, he used Python to prove which adult was right about basic strategy in a children’s game.

[Everett]’s 5-year-old loves a simple game called Hoot Owl Hoot! in which players cooperatively work to move owls along a track to the safety of a nest. Player pieces move on spaces according to the matching colors drawn from a deck of cards. If a space is already occupied, a piece may jump ahead to the next available spot. The game has a bit more to it than that, but those are the important parts. After a few games, the adults in the room found themselves disagreeing about which strategy was optimal in this simple game.

It seemed to [Everett] that it was best to move pieces in the rear, keeping player pieces grouped together and maximizing the chance of free moves gained by jumping over occupied spaces. [Everett]’s wife countered that a “longest move” strategy was best, and one should always select whichever piece would benefit the most (i.e. move the furthest distance) from any given move. Which approach wins games in the fewest moves? This small Python script simulates the game enough to iteratively determine that the two strategies are quite close in results, but the “longest move” strategy does ultimately come out on top.

As far as simulations go, it’s no Tamagotchi Singularity and [Everett] admits that the simulation isn’t a completely accurate one. But since its only purpose is to compare whether “no stragglers” or “longest move” wins in fewer moves, shortcuts like using random color generation in place of drawing the colors from a deck shouldn’t make a big difference. Or would it? Regardless, we can agree that board games can be fitting metaphors for the human condition.

Related Posts

What is NumPy and How NumPy Works & Architecture?

What is NumPy? NumPy (Numerical Python) is a Python library used for working with arrays and matrices. It is a powerful tool for scientific computing and data Read More

Read More

What is Python and How Python Works & Architecture

Python is a high-level programming language that was first released in 1991. It is an open-source language, which means that it is freely available for anyone to Read More

Read More

Why Python is Best for AI, ML, and Deep Learning

Source – https://www.rtinsights.com/ The Python programming language has been in the game for so long, and it is here to stay. Artificial intelligence projects are different from Read More

Read More

THE BEST LAPTOPS FOR PYTHON PROGRAMMING IN 2021

Source – https://www.analyticsinsight.net/ Analytics Insight has selected the best laptops for Python programming. Laptops for Python programming require a better battery life, speed, bigger screen size, powerful hard drive, Read More

Read More

IBM Python toolkit measures AI uncertainty

Source – https://www.infoworld.com/ IBM’s Uncertainty Qualification 360 is an open source library of Python algorithms for quantifying, estimating, and communicating the uncertainty of machine learning models. IBM Read More

Read More

Index Tiobe: Python roste na úkor Javy

Source – https://www.itbiz.cz/ Průzkumy RedMonk i Tiobe vycházejí z odlišných metodik a dávají rozdílné výsledky, v něčem se však shodují. Aktuální přehled popularity programovacích jazyků, který pravidelně Read More

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x