02-23-2018 02:29 AM - edited 05-18-2018 04:43 AM
Update! We've got a winner!
Battleships winner Stefan Lemmens receiving his price! Congratulations!
Stefan Lemmens won the first DutLUG coding challenge! Well done Stefan and congratulations!
Attached to this topic you will find the solutions code of all entries, the maps, scoretabel and tournament version of the Battleships Coding Challenge, conveniently in one zip file. The binary map files can be unflattened from string to a maps class object, so you can analyse in full detail what happened during the tournament.
Thank you everyone!
Cheers,
Pascal
Win a bol.com giftcard worth €50,-!
www.bol.com
Our first ever DutLUG LabVIEW competition is being held during our DutLUG meeting on 17-05-2018, where you could win a giftcard from bol.com, the leading webshop in the Netherlands for books, toys and electronics.
And you have a chance at winning this awesome prize, all you need to do is solve the following LabVIEW challenge!
The Challenge - Classic Battleships!
Download the attached Battleships simulation game, open Battleships_Main.vi and run it. Recognise it? Great! Open the block diagram and locate “Your VI Here” - this is the smart bit that decides where to fire the salvos. The challenge is to create your own solution for solving the grid in as few a moves as possible! The included “Your VI Here” uses random coordinates, which isn’t smart, so replace the block diagram with the best solution you can!
During the DutLUG we’ll pitch all your submissions against each other, to determine who can sink all ships with the least amount of shots. The winner will receive the giftcard prize!
The Rules
We won’t reveal anyone’s code, so don’t worry about keeping it tidy. And with your submission make sure you include all your dependencies - we just might not have that special AI function you’re relying on 😉
Any questions, post them here and we’ll do our best to answer them. And Best of Luck Everyone!
02-23-2018 03:52 AM - edited 02-23-2018 03:55 AM
Nice competition, maybe I'll give it a try but I wonder what the game rules are before starting? Because I remember that normally a player is told when a complete ship is sunk. So when you hit both coordinates of the smallest ship (2 blocks), you can eliminate all surroundings of this ship since you get feedback that you sunk a complete ship. Are you allowed to use this feedback? Because if it is allowed, you do need to check some stuff in the host map 😉
And from the code I can tell that collisions in any directions (horizontal vertical and diagonal) are not allowed, but it's good to mention this in the game rules.
02-23-2018 04:11 AM
Hi @Brandts
Thank you for your question.
The game will not give you feedback that a ship was sunk, it only returns if the square you shot at was a hit or a miss. Your algorithm needs to figure out if a ship was sunk by itself.
note:
Please don't modify the connector pane of the “Your_VI_Here.vi” vi, as stated in rule 3.
05-03-2018 04:18 AM
It has been very quiet here, how are your algorithms al doing? I'm very curious
Wie doet er mee?
05-07-2018 07:03 PM
Wordt aan gewerkt. Ik blijf optimaliseren zolang het kan en ik tijd heb.
05-09-2018 02:31 PM
Is the winner the player with the least shots in 1 single game, or the the least average shots in a series of game?.
My results often vary +/- 10 shots in 10 games...
05-10-2018 12:38 AM
@Peug wrote:
Is the winner the player with the least shots in 1 single game, or the the least average shots in a series of game?.
My results often vary +/- 10 shots in 10 games...
Thank you for your question. The winner will be the one using the least amount of shots on multiple maps in total, so all shots will be added up and the player with the least amount of shots won. Each player will get the exact same set of maps, to remove the random factor. The amount of maps I have not yet determined.
05-14-2018 02:55 AM
05-14-2018 03:01 AM
Will the set of maps be random? Or will they be designed specifically to tell apart strong AIs from weak AIs?
05-14-2018 03:11 AM
@StefanLemmens wrote:
An average over 1000 games seems to be quite stable. This takes a couple of minutes to calculate which might become a problem if there are a large number of submissions...
I did the same coding challenge during the European CLA summit of 2017. Some algorithms can get really advanced and complex, resulting in execution times of multiple seconds per turn. Hence the rule that a turn may not take longer then 1 second to make sure the tourney does not take too long. There is no code to enforce the 1 second rule, because it is dependent of the hardware running the code. It is meant as a good indication of how "fast" your algorithm should be.