Posts

Active Projects as of Today

Hello again, I've been traveling quite a lot recently so I haven't had the opportunity to dedicate the necessary time and effort for writing  here and developing Rubikraze (the project I'm currently working on). This will be a small journal post just to talk about next goals and objectives in my projects and my occupations in general. Regarding Rubikraze, I'm still trying to find out whether the Color-Driven Summation (CDS) method I developed is useful to determine if a Rubik's Cube is solvable or not. My plan to use brute force by calculating the CDS of a bunch of cubes (both solvable and unsolvable) that I'll generate automatically using simple algorithms, and compare both kinds of CDS; therefore, if a solvable cube's CDS is the same as that of an unsolvable one, it would be evidence that my method doesn't work, so I would have to either completely scrap it or modify it. I'm quite optimistic that there has to be a numerical (yet not unique) harmony...

An Audioguide about the Geology of Ecuador

Image
Hello again. I've stayed a little AFK lately due to a big variety of reasons, such as my admission to college, a couple of life events, and some time away from home. But now I'm back. Today I'll write about a project I worked on during the first week of august. As you may have realized throughout this entire blog, all projects I write about are 100% mine; however, this project was not for me, but for my sister. She studies geology and had an assignment with creative freedom, so,  to finish her project on time,  I put Rubikraze temporarily aside (my current personal project). Like I said, my sister could choose any format for her assignment; the topic was geological formations of Ecuador. So, she asked me if I could make an HTML file with a map of Ecuador, and a list of audios (recorded by her of course) talking about different geological formations. As the good brother I am I said yes; the file in itself was not that complex or sophisticated, it was just an image of a map...

Explaining Color-Driven Summation

Image
One of my goals with Rubikraze is implementing a function that can solve any Rubik's cube thrown at it using the beginner's level method. In my previous post about Rubikraze I talked about how there are Rubik's cube configurations that are not possible to solve. For example, if you take a completely solved Rubik's cube, and rotate just one piece of it by manually taking it out and putting it back again, you'll end up with something like this: Assuming that's the only altered piece in the whole cube, we can consider that cube as impossible to solve. There's not a single pattern of movements that could possibly undo those changes without taking that piece out and putting it back again in the right orientation. With the example above it's pretty obvious that said cube is impossible to solve, but what if you took an unsolvable Rubik's cube, and mixed it? It'll still be unsolvable, and you know that because you knew it was unsolvable from the start, b...

Introducing Rubikraze, my current project

This is the first post I'm making in a while. I, of course, have not stopped learning and coding for the past year. I won a national competition in programming, graduated high school, and developed a really useful Chrome extension called Convertool, which I'll be talking about soon in another post. I have taken a break from blogging, not from programming :). I'll talk about Convertool and the National Olympiad in Informatics in other posts so nothing gets mixed. In this post I'll write about the project I'm currently working on, Rubikraze (Oh and by the way, from now on, my posts will have a different font, Consolas, because I think  it represents better my blog's theme, and is kind of more comfortable to read). I've always liked Rubik cubes since I was around 14 years old, I used to dedicate them hours on end. I've got a small collection, but of course I have picked other interests since then. Now that I've gotten a lot into competitive programming ...

Optimizing the Lookup Function

Image
An Inelegant Solution  This is the current chip lookup function in BitNGo: 1 2 3 4 5 6 7 8 9 10 11 function check_boards(ltr, nm) //puts chips in played numbers { for (i= 0 ; i<boards.length; i++) //checks each board { if (boards[i][ltr].includes(nm)) //if it includes the number... { boards[i][ltr][boards[i][ltr].indexOf(nm)] = "X" ; //it marks it as "X" } } console.table(boards[ 0 ]); } This is a terrible solution because in it, we check every board in game. Let's say we have 8 boards playing, and only 2 of them contain the number that has been played. With this function, we would be unnecessarily, checking every board in the game. To avoid this, I have come up with the idea of indexing every board into an array, that way, we know which boards to look for. The idea came to me a couple of days ago, but it was today in Anatomy class that I decided to start working in the concept....

Newer Win Conditions

Image
 In my last post I went through the process of explaining the basic functioning of the small bingo simulator which I'm calling BitNGo. Now, I'm going to explain how each win condition works. This probably won't be a long post. Full Table This probably was the easiest one to code. We just make a for loop that checks if every letter of the board has the complete 5 chips. If every letter is indeed full, a bingo is announced. For this win condition, we applied the very useful array.prototype.every() function. 1 2 3 4 5 6 7 8 9 10 11 12 13 function wc_full_table() { if (played_nums.length >= 24 ) { for (i= 0 ; i<boards.length; i++) { if (boards[i][ 1 ].every(element => element === "X" ) && boards[i][ 2 ].every(element => element === "X" ) && boards[i][ 3 ].every(element => element === "X" ) && boards[i][ 4 ].every(element => element ...

BINGO! Or BitNGo

Image
A few weeks ago, I attended a family bingo game. Not so much happened, we won a couple of prizes, but nothing else. The thing is, I took notes and registered every number that came through before marking it, so I have a log of around 15 games. I thought about using that data to analyze it and do something with statistics. But things have taken a turn. I decided to just simulate a game of bingo in a small program that I decided to call "BitNGo", because uhhhh bits and computers and bingo. So yeah that's what I'm going to talk about in this post. Warning: Madness Ahead By the time I'm writing this, I have already written some lines of code, so I'll just try to explain how it works. Spoiler: I am going to absolutely abuse the use of arrays. And no, the "concept" that I first wrote on my whiteboard, doesn't necessarily have to make sense. Creating the boards First, I have to know how many boards I am going to have. As of right now, this needs to be d...