Saturday, December 15, 2012

Tic Tac Toe - Unbeatable Algorithm

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

For my Computer Project at school , I had to make a simple Java Program. The rules although simple, were very restricting since my class hadn't learnt as much in programming, The program had to be console based (i.e. no Graphics), I could not use any Library Classes apart from the ones that came along with java.lang and Console Input classes. Also, my class hadn't learnt about inheritance and other OOP stuff so I had to stay clear from those too.

The trouble now was to make a good enough project that fit the criteria.
My classmates had settled on making games such as hangman, crossword, calculators etc, but I had already made most of them before while I was getting into programming, and they didn't have much appeal to me.

In the end , I concluded that the project would have to be small anyway, so I decided to make Tic Tac Toe Singleplayer. I'd already made Tic Tac Toe mutliplayer last year as part of a larger package , so I thought that it would be a nice addition to have this as well.

The 3x3 grid was constructed using a 2 dimensional array.
You had to play against the computer in 3 modes - Easy , Medium and Hard respectively.

Easy mode was simple. I used Math.random() to decide the X and Y co-ordinates of the resulting move.

Medium randomly chose between playing easy or hard for that move.

And hard used an algorithm that was impossible to beat. Of course , tic tac toe isn't such a full blown game , and any person smart enough could play any number of matches and always make a tie. But anyway, here is the code for all 3 modes.

Note: This is a function that simply calculates the position that the computer plays in, in a given circumstance. It takes an integer value (int c) that contains the difficulty value (1,2 or 3 for easy,medium or hard). It also takes a 2 dimensional character array of length 3 and 3 (char[][] u) which contains 'X' (player value) , 'O' (computer value) or '-' (empty value). The function returns an integer array of size 2 which contains the x and y co-ordinates of the computed value.

To see the whole program , click here.

     
    public static int[] compute(int c,char[][] u){
        int ar[]=new int[2];
        if (c==1){
            int x=(int)(Math.random()*3);
            int y=(int)(Math.random()*3);
            if (u[x][y]=='-'){
                ar[0]=x;
                ar[1]=y;
                return ar;
            }
            else{
                return compute(1,u);
            }
        }
        if (c==2){
            return compute(((int)(Math.random()*3)+1),u);
        }
        if (c==3){
            boolean mark=false;
            int x=0,y=0;
            int count=0;
            for (int i=0;i<3;i++){
                for (int j=0;j<3;j++){
                    if (u[i][j]=='-'){
                        count++;
                        u[i][j]='X';
                        if (check(u)==2){
                            mark=true;
                            x=i;
                            y=j;
                        }
                        u[i][j]='-';
                    }
                }
            }
            for (int i=0;i<3;i++){
                for (int j=0;j<3;j++){
                    if (u[i][j]=='-'){
                        u[i][j]='O';
                        if (check(u)==1){
                            mark=true;
                            x=i;
                            y=j;
                        }
                        u[i][j]='-';
                    }
                }
            }
            if ((!mark)&&(predict(u,0,0)>1||predict(u,0,2)>1||predict(u,1,1)>1||predict(u,2,0)>1||predict(u,2,2)>1)){
                for (int i=0;i<3;i++){
                    for (int j=0;j<3;j++){
                        if (u[i][j]=='-'&&((i==0&&j==1)||(i==1&&j==0)||(i==1&&j==2)||(i==2&&j==1))){
                            u[i][j]='O';
                            for (int k=0;k<3;k++){
                                for (int l=0;l<3;l++){
                                    if (u[k][l]=='-'){
                                        u[k][l]='O';
                                        if (check(u)==1){
                                            mark=true;
                                            x=k;
                                            y=l;
                                        }
                                        u[k][l]='-';
                                    }
                                }
                            }
                            u[i][j]='-';
                        }
                    }
                }
            }
            if (!mark){
                if (count==9){
                    int ran=(int)(Math.random()*5);
                    switch(ran){
                        case 0 : x=0;
                                 y=0;
                                 break;
                        case 1 : x=1;
                                 y=1;
                                 break;
                        case 2 : x=2;
                                 y=2;
                                 break;
                        case 3 : x=0;
                                 y=2;
                                 break;
                        case 4 : x=2;
                                 y=0;
                                 break;
                    }
                }
                else if (count==8){
                    if (u[1][1]=='-'){
                        x=1;
                        y=1;
                    }
                    else{
                        int ran=(int)(Math.random()*4);
                        switch(ran){
                            case 0 : x=0;
                                     y=0;
                                     break;
                            case 1 : x=2;
                                     y=0;
                                     break;
                            case 2 : x=2;
                                     y=2;
                                     break;
                            case 3 : x=0;
                                     y=2;
                                     break;
                        }
                    }
                }
                else{
                    if (u[0][0]=='-'&&u[2][2]=='O'){
                        x=0;
                        y=0;
                    }
                    else if (u[2][2]=='-'&&u[0][0]=='O'){
                        x=2;
                        y=2;
                    }
                    else if (u[0][2]=='-'&&u[2][0]=='O'){
                        x=0;
                        y=2;
                    }
                    else if (u[2][0]=='-'&&u[0][2]=='O'){
                        x=2;
                        y=0;
                    }
                    else{
                        if (u[0][0]=='-'){
                            x=0;
                            y=0;
                        }
                        else if (u[2][2]=='-'){
                            x=2;
                            y=2;
                        }
                        else if (u[0][2]=='-'){
                            x=0;
                            y=2;
                        }
                        else if (u[2][0]=='-'){
                            x=2;
                            y=0;
                        }
                        else{
                            for (int i=0;i<3;i++){
                                for (int j=0;j<3;j++){
                                    if (u[i][j]=='-'){
                                        x=i;
                                        y=j;
                                    }
                                }
                            }
                        }
                    }
                }
            }
            if (u[x][y]=='-'){
                ar[0]=x;
                ar[1]=y;
                return ar;
            }
            else{
                return compute(3,u);
            }
        }
        return ar;
    }


Well, I admit that this algorithm isn't the most efficient one out there, but I had functionality in mind, instead of efficiency, so I rolled with a makeshift solution.
But what's more fun is to tell everyone that you couldn't beat my program the next day at the computer lab. They enthusiastically take up the challenge at once, and their faces were worth being looked at when most of them lost to the computer at the second game.

It was great fun.

Thursday, December 13, 2012

My website is back with a bang

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

Alright , let's narrate the whole event from my point of view.

Last week , during the evening , I desired to check on the Abstergo Project hosted on my website. To my surprise , I was redirected instead to some other advertisement page. Confused , I then tried the direct URL for my website. The same thing happened again. Furious , I logged in to my host's CPanel , and found out that my account was suspended.

I rewarded myself with a big giant Facepalm. I realized what an utter idiot I had been.
My host was called 0fees. It was a free host and one of the best in it's business out there. I had previously hosted several websites on it's services and I had no problem trusting it to be reliable with my website too. I trusted it so much to the point that I had kept no backups at all of my site. In fact , anything that was to be backed up , was put up on my website. And now , I realized how stupid I had acted. That day , I remembered a big lesson I had learnt in my childhood.

Never trust anything that's free. (Except Google)

So now I was stuck without a website. All my files were lost. All my database entries were gone. Why was my account suspended? Well it's obviously a marketing gimmick to get me to upgrade to paid hosting. I actually considered paying for the hosting just to recover my files back. But then I realized that the paid hosting would be on a different server , thus removing all hopes for a recovery.

The worse part is that my website meant a lot to me. Every line that I code , every line that I write on the internet , every account that I make somewhere , can be traced from my website. I use my website to organize myself. So that I can keep track of every contribution I make to the internet. This is especially required due to the fact that I have OCD. I have to sort every of my actions else I feel that all my work is useless. I have to remind myself that I have a blog , I have a twitter , I've made my own quotes etc to realize that I have done something atleast. The worse problem an organized person can face is losing his organizer. And I had lost my website.

At once , I began to rewrite my website. It was of course , a hard job. I was aided by Google's webcache and I could recover the text content in my website. But all the resources were lost and I had to make them from scratch. Luckily , I had a backup of a few of my bigger projects thus they could also be restored. Once I was done , came the question of where I would host the website now. I first considered turning my home desktop into a server since it was switched on for 20 hours a day anyway. Then I remembered of my good friend , JamezQ. He owned a server with above 99% uptime. I had hosted small Java projects on it many times and it worked great. But I was hesitant in asking to host my entire website on it. As it turned out , he was glad to have my website on his server. And so , I uploaded all my files , configured the MySQL databases , and restored the subdomains. But even then , a few projects could not be restored as I had kept the backups on my laptop which I do not have right now.

So , yeah. There you go , my website is back with a new look. There's new content and a better interface.
Check it out at http://enkrypt.in

Also , while making the website , I took to myself for making some entertaining error pages.
400 - Bad Request http://enkrypt.in/400.htm
401 - Authorization Required http://enkrypt.in/401.htm
403 - Forbidden http://enkrypt.in/403.htm
404 - Not found http://enkrypt.in/404.htm
500 - Internal Server Error http://enkrypt.in/500.htm

Thursday, December 6, 2012

A record every day

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

One particularly interesting fact about my weird life is that I have an obsession with getting stuff done. Even if any work at that point happens to be non existent.
If any day passes by without any significant reduction from my workload/to-do list or any addition to my personal records , then that day is to be considered as a complete waste of time and energy.

Now , if you've read my older blogs , then you'll know that I am an OCD patient. What that means is that I need to consistently keep a track of any work done , any work that shouldn't be done , any work that should be done in the future , and so on.
Out of all these , obviously the most important is to keep track of any work that needs to be done in the future. This is why last year , I furnished a complete To-Do list of every work that needs to be done by me at some point later. As of now , the list stands in 57 points of work that needs finishing. All the points mentioned on the list do not consist of everyday work such as shopping or cleaning the lawn as some might expect , but it is rather a collection of long term projects such as learning Android Development or writing a previously thought out novel.

I hold this list to high regard. Every point noted within demands a lot of time , patience and energy which would in some way or the other benefit me later either by self gratification . or by any other method.
When I look back to my past , I see the transition or marking progress. When I was 10 , I used to see how much I had progressed every year. By the time I was 13 , I measured progress monthly. And now at 15 , I do so in a more or so , daily/weekly manner.

The next point and the most important point is the one presented by the title of this blog.
And that is my commitment to setting records.
You see , every now and then , I attempt activities that are not listed in my to-do list either because they are not important enough or they produce inconsiderable results. Among these , I put forward great emphasis on personal achievements.

What sort of personal achievements you ask?
Well let's say that just today , I got chased by a beggar for the first time , I walked over a sewer bridge for the first time , I tripped over a road divider for the first time and I was ambushed by a group of crows for the first time.

It's just that the possibility of doing "firsts" fascinates me. The fact that I'm doing (or being done) something for the first time in my life gives me a great deal of satisfaction and that is why I deliberately put myself in such situations where such "firsts" are possible.
Like for example , all those "firsts" that I accomplished today , they were the result of deliberately choosing to walk all the way to my friend's house , rather than taking a cab (or an auto in linguistic precision).

This is why sometimes , instead of sitting at home and trying to contemplate on sad and stupid stuff , I sometimes set foot outside my house to get some achievement accomplished.
Just this month , during the Diwali dinner held at school , I accomplished a lot of "firsts".
I took pictures with every girl in my class (except 2 because they did not turn up to the party)
I wore a suit for a good whole of an hour
I confessed to a watchman how hideous his uniform was
I walked 10 meters on my toes and most importantly ,
I ran through every corridor that the school had (a pretty great task considering that the party was held at the grounds implying that every corridor was fucking dark and deserted)

And the most daring firsts were also recorded this very month
I stayed 24 hours without food
I stayed 24 hours without water (on separate days) (dehydration is worse than hunger. I had to sleep more than half of the day to keep myself distracted)
I slept for 20 hours straight
I ate a burger for every hour in a day
And most importantly - I got drunk for the first time (this was just last week and it was just a few simple glasses of beer , nothing to worry about)

So , yup. With all these stuff to do , I take pride in saying that almost every day , I am setting and breaking records. It seems eminent that with so much , soon I will be needing a list to maintain all these achievements , and every achievement that was close to completion and every achievement that should be avoided  , and so on.

So , yup. That is it. In summary , I give high regard to working and achieving. Something that I take pride in.
I know that many of the records as such do not present much moral value and you will dissent in opinion about the necessity of performing such acts , but I assure you that they were all executed in safe environments. The last think I want you to assume is me being a reckless teen. Pssh , me? I barely even get out of my house.

I just think that this is my blog , and it needs to contain any personal habit that needs to be mentioned. Also , I haven't posted a self centered blog in a very long time.


Wednesday, November 21, 2012

What do you want from life?

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

Ok , first of all , as usual , an apology. I had two successive exams on and so I could not find the time to post a blog in two months ( Not like you care anyway ).


Pre-introductory warning : This particular blog post does not apply for nihilists and such other people who's only reason for not committing suicide yet is because it'll upset their parents.
Such people will be unable to reach an agreement between their views and the one that this post will offer due to the presence of such elements that assumes that you still have some motive left in life.

Now , before I can answer the very tantalizing question which I presented as the title , I need to introduce you to how I came about it.

I place a quality of a man by how much he has completed two processes of his life. The first process is what I call "knowing" , and the second process is "deciding".
It's like listening to two sides of a story (knowing) and then forming an opinion on which one you think is correct (deciding).
I am a teenager and thus consider myself in the learning stage. Meaning that I may not have decided for everything that I have known yet and reserve my decision for when I reach a higher form of understanding of that topic.
And so going on , the last thing that a person must do to end the process of  "deciding" is to philosophically define the word "life" . Which I hope to one day do so with a satisfactory conclusion.
So then I started to think about those questions that I can answer by myself. Stuff like "Why is life necessary?" and "What leads to belief?" , etc.
And that lead to the question in the title which put me into a long trail of thought.

But after around an hour of thinking , I came up with an answer which atleast applied to me and most other people.

A satisfied ego and a satisfied hunger for adventure.

The first bit is kinda obvious , but it is the last bit that will attract questions. Well , we're gonna discuss both anyway.

Now , the first thing that came into my mind when I thought of the question was this movie called Revolver.
Revolver is kinda my favorite movie and it also happens to be a movie which has influenced me a lot.
It happens to answer most of the question in the title and described in detail about how our ego supersedes us.

"A satisfied ego"

Come on , we all know this to be true. What don't we do everyday to make sure that we get what we want , to do what we want , to satisfy every whim that our ego puts forth?

To quote from Revolver :
"There is something about yourself that you don't know. Something that you will deny even exists until it's too late to do anything about it. It's the only reason you get up in the morning, the only reason you suffer the shitty boss, the blood, the sweat and the tears. This is because you want people to know how good, attractive, generous, funny, wild and clever you really are. "Fear or revere me, but please think I'm special." We share an addiction. We're approval junkies. We're all in it for the slap on the back and the gold watch. The "hip, hip, hoo-fucking-rah." Look at the clever boy with the badge, polishing his trophy. Shine on, you crazy diamond. Cos we're just monkeys wrapped in suits, begging for the approval of others. "

The sad part in the whole thing is when you understand that you cannot destroy your ego. Because it is your ego itself that says that it must destroy ego. You just think that it's you trying to do it.

"The greatest con, that your ego ever pulled... was making you believe... that he is you. "

Well that's for the ego part.

"A satisfied hunger for adventure"

Ah , this bit is interesting. In fact , it might even be a part of the previous statement. But it stands out like a sore thumb , so I decided to add this in the statement anyway.

"I'm happy with my quiet life." - Said almost everyone.
But how many people actually meant it?

Every time you get up from a movie , every time you finish that video game , every time you finish reading that novel , you sigh. You sigh because you have to return back to your boring miserable life. What would you give to be Sam Witwicky? What would you give to be Altair Ibn-La Ahad? What would you give to be Sherlock Holmes?
Everything.
If only it was possible.
You may not want to all so much , but admit it. You know the feel when you want to be part of it. Part of the drama. Part of the action. When you want to be the character that does it all.

How many times have you sat at work/school bored , and dreamt of how a bunch of terrorists randomly burst into the place and you saved everyone there? Admit it. You've done it.
And why did you do it?
Hmm , you can pretty much answer that yourself.

And you can always spot those who want adventure really bad. These sort of people may seem quiet at first glance. But you can always tell them apart by how they easily turn a really small issue into a huge thing.
They easily respond to emotions and you can easily make them very happy or very sad.
It's just that these sort of people are the ones who've accepted that they're never gonna get the adventure of their life. So instead , they turn whatever of the boring life they have , into as much drama as possible.

I remember this one girl in my class some years ago who used to cry at every small thing. At first I suspected that she had some problems to face back home. But then one day , I read her English essay on "My Thoughts Last Night". And My God , was I shocked! She'd written stories of gore and blood and war and murder and what not. Soon enough , her condition became apparent to me.


So there ya go. I've justified my answer. But I do not claim it to be correct. In fact , every person may have a different answer to what they want from life. And every answer may seem as convincing as the next.

If you have your own answer to this question , write it in the comments below. Also don't forget to mention anything that you may think that I've written wrong in this blog. Please do point out any errors you can find.

Catcha laterz. I got more exams coming up.

Quote : "In every game and con there's always an opponent, and there's always a victim. The trick is to know when you're the latter, so you can become the former. " ~ Revolver

Monday, August 20, 2012

Influence

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

Been a long time since I've blogged. You can blame that on school and shit. I've been very preoccupied lately with all the accumulating work that I've been getting and hell it's been hard to even take a minute out and do some thinking.

Anyway , so yeah , you read the title - Influence.
Influence is essentially a very important key factor in psychology and philosophy.
This word has so many meanings and interpretations that it makes a fine topic for long discussions.

Let's start with the definition:
Influence : The occurring effect when there is a deviation in the normal routine/behavior of an object or a body due to impact of force/energy/information originating from an external source.

So at the lowest level , this means that , say a body A is moving with uniform speed along a straight line XY. Collision with another body would result in change in either direction i.e it deviates from XY or change in it's uniform speed. The body is thus said to be influenced.
Note that if there is change in the body's shape/size from the impact of the external force , but no change in speed/direction , then the body is said to have been "uninfluenced" by the external force.
Technically though , this is not really possible. The object that we were talking about had only 2 properties entitled to it , Speed and Direction. Shape and size were just the "features" of the body in it's current context. In reality though , as change in feature WILL cause change in property , it is actually physically impossible for properties to remain unchanged if the body is "influenced" in any way.
Also , as a living being , we have infinite number of properties/features entitled to us. And always , change in one will has resulted in change in every other.
So from henceforth , without mention , we will assume that when influence takes place in a living body , it affects ALL its properties.

The above example of the moving object , can be related to us on several larger scales in more advanced forms. Let's begin with the lowest level cases and progress to the largest.

(The following categories have been separated by me and so I apologize if they already exist under different names or are different from the following.)

1. Sense Influence :
Leaving spirituality behind , we have 5 senses : touch , taste , hear , smell and sight. It is these senses that interact with the external environment and relate to the brain which acts as a whole and respectively responds to the influence by making our body react to it. This reaction can occur in various ways. Speech , movement etc. So yeah , this is pretty much like that stimulus/response thing you learnt in primary school. It forms the basic level of humanity and human character since everything we do relies wholly on what we receive through these senses.
 - No influence :
If all the 5 senses of the body are removed in order to prevent sense influence , then ... umm , idk. This part is a bit weird. There will be nothing. The brain , not knowing that it even exists , will not attempt to do anything? I don't know , we'll have to do some guessing here since I did not find any reliable source for research. So , maybe the brain will just live? Maybe it'll live without even knowing that it exists , so it might be as good as being dead. It will age without any functional change since it has nothing to do. OR , knowing that it does not exist , it may cease to stop living. It might stop all functions including it's blood/oxygen regulation and eventually die out. Anyway , the point here is that it would be horrible.
 - Artificial influence :
Now that we know that the brain essentially holds the sum of form all its senses over time , tampering with those sense can be used to provide artificial sense influence. The technology to do so has already been developed but not perfected enough to be available for testing. Just imagine. Take a brain , isolate it from all its senses. and connect the sense receiving "ports" (I can't find a better word) to computer devices which know how to send/receive data impulses from and to the brain and knows how to interpret the brain signals. We could literally place a person in a virtual environment and give him his own virtual body to interact with. You could send the brain artificial signals about sight , which is actually just the visual rendering of the virtual environment. He could then see around and also his own virtual arms/legs etc. And the brain of the host , sending signals for movement , would then co-relate visual sense as well , as it would be able to see the moving hand it front of it , which the brain had sent signals to do so , and had been interpreted and processed successfully by the machine. He would also register the sense of touch , of how his feet were touching the floor and his body against his clothes , etc. Collectively , he could live in a digitalized environment as though it was completely real.
Now think , what if that IS reality? What if we are all actually living in a virtual environment with the illusion of reality? It's pretty much possible , even though you're probably gonna send me hate mail about The Matrix later today. If this is correct though , the possibilities would be much more interesting.

2. Emotional Influence :
The next big thing is how we are all so much affected by our own emotions. Emotions are responsible for most of the choices we make and the actions we perform. Although emotions themselves are products of influence , they themselves play a very large role in the forthcoming and resulting influence. Emotions can result in good/bad actions. If Hitler wasn't so hateful toward the Jew doctor who was treating his mother when she died , the holocaust would've probably never occurred. If our army forces weren't influenced by courage and bravery , they wouldn't take the risk of protecting us form terrorists and other threats. If we couldn't laugh , then there would be no comedy shows. If we did not feel being scared , then no one would make horror movies. The whole world is so diverse and running the way it is because of emotionally based actions and choices occurring everywhere. This is partly why a robot does not laugh when you tell it "There are 10 types of people in this world. Those who can read binary and those who can't"
 - No influence :
When emotional influence is removed , we get complete unbiased opinions , decisions and actions. A computer will not stop processing because it hates you. It is very rare to see people making choices that are not biased on one personal emotion or another. It actually helps several times especially when you're angry. You just have to tell yourself that you wouldn't make such decisions if you weren't emotionally influenced , so just calm down and think what logically should be done , regardless of how you feel about it. This can be a bit hard to do , but once you're successful , you will realize it's importance. It takes a great man to be calm and remain proud of his actions with everyone else laughing beside at him.
- Artificial influence :
This is the interesting part. I myself realized this was possible just a few days ago. I found out that it is actually possible to "simulate" emotions in a person and thus indirectly influencing a person's actions. The color blue for example , imparts piece and calm to a person whereas red stands for anxiety and aggression. In a similar way , the manner in which you speak to a person can also affect his/her emotions toward you , hence influencing their actions. So next time you want Bob to do something for you , don't shout at him , you retard. Just buy him a goddamn drink. Once you realize it , it's actually quite fun. The way you can induce emotions in any random person by just speech and actions and hence manipulating his actions to your advantage. Similarly , you can forcefully convince yourself to be happy when someone/something angers you to avoid negative emotional influence.

3. Informational Influence :
From the moment we are born , we are loaded with information from all sources. We start by learning and adapting to a language , then learn to communicate through it. Then use that language to receive more information in that language. This "premade" information that we receive which did not originate form ourselves , is responsible for informational influence. This influence is responsible for today's advancement in knowledge. We are learning what others have discovered/created and are basing our discoveries/creations on them. This pre-existing information acts as a base on which we contribute to. In school , at home , from the television , from the internet , almost EVERYTHING today that we comprehend is not made by us , thus playing its part in informational influence. For example , this blog post is MY creation , so it won't have any influence on me. But on you , it plays its part , since it was not you form where this information came from. But the essential information I required to make this post had come from an external source . Thus informational influence leads to resulting information that just adds to it. It can be compared to a tower. Every person born must contribute to either increasing its height or guard a part of the tower that has already been built. A person does not have to make the tower from scratch since lots of it has already been built by his ancestors. This is how information escalates. The person who invented the cloth button , we probably don't know his name today , but he influences all our lives. This means that if he had not come up with that invention , the universe would have probably taken a different turn and the world today would probably be different , regardless of whether the button would be invented later by a different person or not. If he made the button as a square , then that small change would have impacted all our lives today. It is a sum of all these small factors that shape our lives today. As much important as is the process of gaining knowledge , it is also necessary to discover knowledge sometimes , even though it has already been made. In that case , there is no informational influence , as it is you who is deriving knowledge. But then again , doing so will cost valuable time that can be used to make yourself up to date with more later knowledge. Here's a relevant chat log : http://pastebin.com/T48TGQPc
 - No influence :
This is what the Early Men had to endure. They has nothing to start with. Just themselves. But as humans , they felt the need to communicate and make work easier. Thus they invented languages , made drawings etc to communicate and start out creating information. It is a gift that we have so much already made for us , that we don't need to "invent the wheel" again. And by being given so much information to learn , it is our responsibility to in turn contribute by adding information to it.
 - Artificial influence :
This is ambiguous. Artificial information would probably mean , a lie. Because a lie isn't real information , it's false , and hence artificial. So next time someone accuses you of lying , you can put on a nerd cap and say that you were just just influencing him with artificial information.

Well that's all I have for now. After days of procrastination , finally my post is complete :D
It was fun influencing you with influence about influencing influence.
I can drab on and write separate blog posts on topics like "Emotions" or "Information" , but that'll have to wait for sometime.
Alright , I'm done here. Catchya Laterz. Don't forget to influence me with any questions down in the comments. Ciao.

Quote : "You have the option of either building ideas on existing ideas or starting out as the Early Man" ~ EnKrypt

Friday, June 15, 2012

What makes us different?

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

What are we? The most advanced species on earth? The product of billion years of evolution?

We were apes weren't we? That wasn't so long ago to be honest. We evolved fairly quickly compared to many other animals.
So , did God decide to suddenly lead us into the path of evolution that would make us the most advanced beings on earth?

No.

We evolved because we felt the need to.
With as much intellect as we had , we figured that in order to make our lives better , we must become more intelligent and more efficient. And thus we adapted , becoming who we are now. We are still evolving. We seek to be able to do more and to be capable of thinking more.

So that's settled. We are all humans. And if that made classification any simpler out of the 1.7 million discovered species on earth , we all are different. Yes , different. In every way that matters we are all humans. The way we think , behave is all common to our society but the answer to "how so" varies with every person.

I have often contemplated on this topic for hours and hours struggling to take in the complexity of the human mind and the way it functions with every different person. Predictably similar yet startlingly different. I know that a person who is watching TV is not going to turn back and look across the room unless it is of utmost importance. The same may not apply when you might be watching a movie on your computer because you can always pause it or play it back from the part where you got distracted from , but there's no watching it again on TV if you missed it.

We are all similar to the point that we all are humans. And different to the point that we all are different humans. There was a time before a couple of years back when I used to think that citizens of foreign countries probably think differently or have a completely different approach to situations. That was probably the most inaccurate assumption that I have made till date. When I conversed with a few American and African acquaintances of mine , I figured that we were so similar that even our major philosophies coincided. All of them went to school and learnt pretty much the same subjects and lived in quite the same way as we do. I guess I should credit that to universal concepts like money and power.

And yet our cultures and social behaviors are so different. That of course is due to the society that they were brought up in. But these days , due to this new social element in our life known as the internet , we are getting shaped by common factors as well. Putting aside cultural and social influences , I shall now lay down my final deductions on this matter.

Humans are unique. It's just how we're made. Every person born has a unique identity to themselves. Unique fingerprints , unique DNA. It's like you have a certified position on this planet where you have been already registered with a unique ID. Genetics and hereditary factors make sure that we are always unique. A combination of 2 unique ID's making another unique ID and this cycle continues. I remember spending a week by itself pondering about how unique we can get to be. A position in this planet that no one else can take. And well it isn't possible to cram a week worth of philosophy into this blog , so i'll just delve into the basics. The rest might be for some other day.

Alright , I began by formulating a simple experiment that I named the Parallel Thought Experiment. It isn't exactly simple to perform in real life so I asked a few high ranking doctor's (it's good to have friends who can contact you to the right people) about their conclusions on it. It basically involved taking 2 twins born at the exact same time to have no conscious memory of any past event and placed in two different but exactly identical rooms. (the point here is that they must have experienced the same things at the same time)
Now , will these two people think along the exact same lines? Will they both get up , and think "Where am I" at the "exact" same time? The doctor's were impressed. They told me that such experiments had already been conducted in many places but in all cases , the responses were never same. This seems to indicate that we are all different mentally. Even though we might be physically the same and have gone through the same influencing factors , out response will be as unique as the next person's. In short , parallel thinking is never practically possible. The question "why" has been of great controversy. And most people (including me in the past) have used this opportunity to fit in the concept of the "soul" and such.

Another concept that I had thought of a long time ago was this:
We all have our favorites don't we? Favorite color , favorite movie , favorite song etc
I found this intriguing as well that what I find pleasant , may be disturbing for the next person. For example: I like beats. I don't care how crappy the actually song as , as long as it has a good enough beat to go along with it , i'll swallow the whole song up. And it's actually so surprising that other people don't even care about it. I mean , when there's a catchy beat going on , others might say "Meh , change that song" , and all I can do is stare in awe. I mean , how on earth is it possible for someone to not be interested in something so awesome.
Now , the reason why I like good beats so much is because I'm tuned to it. I'm more comfortable to it and thus my ears are always on the lookout for it. It's how I grew up. Your tastes depend on how you build them. In the same way , I might not enjoy electronic so much , where as there might be a hell load of people who have claimed to not have heard music so fine as that. Again , this is how you hone your tastes. All our favorites are what we are tuned most to. We find it better than the others because that's what we have sharpened our tastes to.

But then again , a revelation struck me. Lets take our favorite colors - mine is blue. My brother's is orange. Different. Colors , one of the most basic factors of influence , happen to differ in taste as well. I asked myself "why". And at the end , I thought of something. What if we actually see different colors? I mean , what if what I see as blue is the same as what my brother sees when he looks at orange? He knows it by the name "orange" so that's what he calls it. But what if the colors we actually saw were different from what each other person sees as well? It would make perfect sense wouldn't it? What I see as blue , is everyone else's favorite color. Only , they know it in different names than mine. Now , take hearing as well. People may not share their favorite song with mine because maybe they don't hear it in the same way as I do. Relate this to everything else.

Finally , we can say that whether we like it or not , whether we'd choose to or not , we're different. Different in personality. And again , we are similar. Similar as a whole being.

In the end , it all depends on whether you're an optimist or a pessimist.

Quote:
‎"Order is your next Anarchy" ~ EnKrypt

Wednesday, May 2, 2012

My awesome dream - Bloggers Day

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

Well today is world blogger's day and it would really be a shame to not use this opportunity to post a blog. Well I don't really have anything in mind. So i'll just post this awesome dream I had today. I'll just copy paste the description of the dream I wrote on facebook and G+ . Here it goes:

Whoa , i had one of the most awesome dreams on earth today. I don't even know why im posting this here but well , i want to keep track of it before i forget the details. Anyway , heres what happened. I was supposedly a Russian Spy sent to Germany to find out what they were going to do next. I think its set into a WWII scenario. And weirdly , I was a girl. AND it was in 3rd person view. My dream always changes to third person whenever i'm a girl. Anyway , so this wasnt any stupid girl, this was one of those chicks you'd really like to hang out with. As of now , the details seem to be pretty sharp , so lets go on. She was wearing a kind of shirt , well maybe a top? im not sure. Anyway , it was like those pirates outfit. The material was a bit thick and velvetty. And she also had blue pants , or trousers or whatever. So , first thing i know , i went to bar disguised as a German. I had a drink with a few german friends of mine while trying to overhear what the nazi's next table were saying. They were talking in whispers so i couldnt really make out at the beginning. All i remember was that i was staring hard at the table and the wine bottles while concentrating very hard on what they were saying. I guess because my attention was fixed on listening so hard to what they were telling , i paid no attention to my friends and so i cant tell you anything about how they looked. I can tell you though that the pub was like any other local bar. It had poor lighting and the furniture was old and reeky. OK , heres the catch which made it most epic. EVERYONE WAS SPEAKING IN GERMAN. EVEN ME. I mean , wtf? , i dont even know german. So my mind literally tried to make it sound german , yet made me understand what all that bullshit means. I mean , whatever i heard and spoke , im sure it isnt even german , it probably just SOUNDS so. Anyway , the nazis started arguing after a while in raised voices so i could hear what they were telling. It was mostly stuff like scheisse and beisten and halten and ist echt and der aschlok. I have a feeling some of them might be legit swear words, but idk. Yeah , so the point is that i found out what they were going to do , and i got out of that place and walked to the park to relax a bit. And I saw my (HER) boyfriend after a while and they started talking some crap and then they kissed (intesting). At this point though , I turned into the boy in first person view. She started to say something to me like "I think I should tell you a secret". I whispered somehting like "You dont have to tell me. I know who you are. You shouldnt have betrayed us. You were sent to russia in the first place to act as OUR spy". I took out a gun from my waistbelt and aimed it at her stomach. I said I was sorry. And then there was the bang , she fell in slow mo , i think i cried and then I went back to the german base ( the walk to the german base was pretty long ) and told them that the spy was dead. Then i was sent to a factory building nearby where i would be joined by an army and we had to destroy the russian barricades on the opposite side of the building. I used some old jeep sort of thing to get there. Ok , so about this guy who i was. He looked pretty decent and well he looked sort of like those blonde german guys you see running around with guns. Well for some stupid reason he wasnt wearing army. He was wearing a loose shirt and shorts? wtf , idk. Anyway , when i reached the building , i was given rifles and grenades and was told to go to the open front on the third floor which the russians had blown open previously. And our goal was to exterminate all the guards in the vicinity. We reached the opening and uncovered it. I just hid in one of the corners of the opening. And occasionaly turned around to look who were where. I found out that along the horizon , which was pretty close , there were two gatlling guns mounted on either side. and a random 4 people strayed on the roof with rifles. My team fired at random and the russians seemed to be doing the same. The gattling guns werent that fast at shooting bullets at a rapid rate but the bullets themselves were very fast and the bullets were big . I could feel it as they whizzed past in front of me. Then all of a sudden , as one of my members peered round the corner , a bullet hit him square in the chest and he fell down right in front of the opening. All of a sudden , all the gattling guns and the rifles tore in front of us. When i recovered my vision , his body lay splattered all over the room. This freaked me out. I dint want to stay there anymore. I climbed the stairs all the way to the seventh floor and then to the terrace. At this point , I was at a higher altitude than the russians. While they were busy scanning the floors below , i sniped clear headshots at the men who manned the gattling guns. But then one of the other guys shot my arm and i lost support and my head hit the ground knocking me unconcious. When i woke up , there was this guy standing above me. A gun at his hand aimed at my head. He told me that my team had been defeated and that they had now declared russian rule of the city. He told me "You should have stayed away from this battle. That german girl whom we brainwashed into a spy whom you just killed? I told her to convince you to stay away from us. But you killed her before she could say so. Dont you know , it was YOU who was russian . The betrayer was YOU. You were tortured by the germans which resulted in a memory loss. You were a good asset. But now you can join the friend you wronged" . and then there was the bang and then i woke up. 5 minutes later when i started to recall my dream , i was like "hell yeah!" Well , if you have a good imagination here , then a dream like this would be really fun im sure , especially when your mind is trying in every way to make this realistic. Bit of paradox here and the revelation in the ending is awesome. Anyway , im losing bits of the details now but atleast i've typed it all out. So thats it. Wait , did you read THE WHOLE THING? omg , you're awesome i tell you that. Cheers

Wednesday, April 25, 2012

Artificial Intelligence

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

Note from author: 
None of this text is guaranteed to be true or considered a fact as the field of study has a considerable margin for error. This is just an approach at calculated assumptions to better understand the beginning of AI and how it functions and propogates behind the scenes. There is a high chance that some lines here can be proven WRONG as per standards

Allright then , Artificial Intelligence -
What it means in the simplest level:
The ability to make a decision by oneself based on a combination of circumstances , advantage , consequences and personal favours

Aim:
To simulate the human thinking process whose characteristic features are to be parallel and seemingly random

And thus we arrive to-
The root of Artificial Intelligence:
Random. Just being randomly random. The key to AI is to implement this randomness which is similar to the random thoughts of the human mind

Level 1 - Random choice between 2 options :
Technical - 0 , 1
Application - Yes , No


Level 2 - Random choice between finite options :
Technical - A , B , C , D , E , F
Application - Red , Blue , Black


Level 3 - Make an independent decision
Technical - Corrupt Memory. Decision to proceed
Application - Someone unknown to you , throws a punch at your face all of a sudden. Response to that action



Artificial Intelligence at its maximum will be capable of distinguishable characteristics of a human. Keeping secrets , having dreams , emotion etc. Although it is technically impossible for a machine to feel emotion , an imitation is what could be achieved.

The ultimate evolution will take place when the AI will be powerful enough to develop AI by itself. The potential of development then will be massive. But with every shred of success , comes a significant amount of danger. Machines , if out of control , could end up wiping out the whole of the human race with the mental capabilities of a human. Alas , with the opportunity of a gigantic scientific evolution comes the potential of the  Armageddon.

Levels of AI simulation:


Level 1 - 100% random
No relation of output with input and output generated would probably have been the same if another input was given


Level 2 - Imitation at reality
Not what we call REAL AI. But behaves into making you believe that it is. Just an imitation of intelligent talk.
Dis-functions when you try smart conversation


Level 3 - REAL AI
Behaves in every way that matters , as another human would with Level 3 of the random levels.


Level 4 - FULL AI
Processing and non redundant capabilities of a machine combined with the mental superiority of humans would be able to create AI by itself and will be a master at perfection.






Tuesday, April 17, 2012

OCD Boon or Bane?

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

I was rifling through a Wikipedia article about RenĂ© Descartes , supposedly a great patron of mathematics and philosophy when all of a sudden I remembered about something called OCD which I always wanted to know more about. I don't know why I thought of it at that time , but the next thing I knew , I was on Wikipedia again. This time staring at a different title:


Also known as Obsessive Compulsive Syndrome , this is an anxiety disorder characterized by intrusive thoughts that produce uneasiness, apprehension, fear, or worry, by repetitive behaviors aimed at reducing the associated anxiety, or by a combination of such obsessions and compulsions. In short this means that people having OCD often have random/unwanted thoughts/habits (this is common even among other people) , but they feel uncomfortable or anxious unless they carry out their compulsion.
I read on and realized that the description of the symptoms was quite precise , if not exact , with what I did
I never really thought before that I actually had a disorder of such sort. One major symptom of to always keep things arranged and organized in a systematic order. That made sense like nothing ever did. I opened my school bag and stared at the books inside. Not only were they arranged according to height , but also subject-wise. To accept what I had seen and to admit that I functioned a bit differently from others took me some time.

At first , when I started writing this , I originally titled it as 'God isn't really funny'. Seriously , if you look at it , I have the weirdest combination of abilities and disorders. Who the hell will like it they've been informed that they have the ability to learn and cope with new concepts/environments really fast , but on the other hand , they will also have OCD. So that means you'll get the hang of Java in only an hour but you'll take days to write a good enough project on it. Oh yeah , I may have forgotten to mention this - OCD doesn't seem to have any effect while you're learning or understanding new principles. But it haunts you in full measure when you apply them. In this case I consider myself quite lucky that this is one of the only drawbacks to what I have to endure. The main disadvantage is supposed to be that it will be hard to ignore irrational thoughts and anxiety and uncomfort will be felt unless the compulsion is carried out. I don't know if I'm just "used" to this uncomfort but I don't seem to have any problem at all at discarding irrational thought. If the thought , however is completely sane or will deal no harm , then I don't see any reason not to carry it out.

As I read on , I was greeted by more revelations:
The article said that people diagnosed with OCD commonly share personality traits such as high attention to detail, avoidance of risk, careful planning, exaggerated sense of responsibility and a tendency to take time in making decisions.
And all this while I just thought that I was good at covering up my tracks. Ironic as it seems , I have almost never been caught for any offense I made till now. Makes sense now I guess. You will be quite surprised at how I would think about the hundred possible ways I could get caught and then take steps to eliminate them all. Always thinking a couple of steps ahead was my forte.
Within moments , I realized that I had more advantages than disadvantages at my disposal. Take the ability to learn fast and add careful planning and avoidance of flaws , and you will then have attempts at perfection. Only , it just takes twice the time.
At this stage , I would like to assert that the personality disorder characterized by a pervasive pattern of preoccupation with orderliness, perfectionism, and mental and interpersonal control at the expense of flexibility, openness, and efficiency is also known as Obsessive Compulsive Personality Disorder. Although I feel that I have OCPD and not OCD , it is said that symptoms are very similar and since OCD is more widely known , I will stick to OCD for now.

Secondly , this 'careful planning and thinking' allows me to pull out my strengths even in the most hopeless of situations .OCD is probably the reason that I can outline these advantages in the first place. It allows me to first think what is helpful and what is not in particular circumstances and then do whatever necessary to gain the lead. All I have to do now is make sure that I play on my strengths and avoid falling into occasions which are to my disadvantage. If I can somehow make sure that over-thinking , mental pressure and time consumption are not limiting factors , then I will gain the upper hand.

Thirdly , I realized that OCD can come at one certain point of time from several factors. For example , if I start to feel mentally tired when I'm doing some hard thinking , then due to fear of getting too tired I can abandon thinking about it and divert thought to somewhere else. Just now , before I started typing out this paragraph, I started to feel a bit weary so I just took a round in my house thinking about this anime I was watching yesterday before I continued typing the rest out. So this means that if the task at hand proves to be uncomfortable or tiring , then I can choose to divert my concentration on something less trivial.

Alright , for those who are interested , lets step into my shoes and feel how it is to face OCD.
First , OCD can become seriously inconvenient while doing something will full concentration/dedication. In my case , that will be Programming. Writing a one file program is pretty easy (and fun) and will probably make no difference if any other person programmed it. The problem kicks in when the content increases (or the complexity of the logic). Usually  , you keep track of the features to implement in a program. Lets say I've got Login , Chat and a 'Users available list' left to implement while I am programming a Register feature. My mind constantly keeps telling me that you've got 3 more features to finish coding. My subconscious however , delves further into each feature. This tells my mind that I've got to make a prompt system for Login , A userbase to keep track of the users' records , a password checking protocol , keeping track of who logged in from where , etc . Then it goes into the next thing I was yet to do. My mind realizes that to implement Chat , I have to configure socket connection , make a working protocol to send , receive live messages , make sure every username is unique, etc.
This entire deduction builds up and finally gives the illusion that I've got millions of stuff left to do which finally results in headaches or feeling mentally fatigued. This illusion can be intimidating and while you're trying to remember every one of those features that you were going to implement , you miss out on concentration on the actual task at hand and this results in your work slowing down considerably. Unless I don't actually look back and realize that I've actually got just 3 simple features to complete , this mental stress continues.
This can also happen when you're try to read/understanding certain logical components which was programmed by  a person other than you. You're trying to figure out what programming in that particular fashion will result in . You're just trying to figure out what the output of his logic will be. Simultaneously though , your subconscious will question WHY he coded in that peculiar fashion. Although most of the components make sense only at the end of the program , till then you're constantly bombarded with questions like - "why hasnt he used that variable yet?" , "why did he use that specific datatype?" , "why didnt he do something simpler?". This again leads to mental fatigue and slow progress.

Lets take an example more common and more applicable to people on a day to day basis.
Now , if you step into the room of a person suffering from OCD , you will see that every thing is arranged in one order or another. It may not make sense to you but it certainly makes sense to the person who arranged it in that fashion. Most likely , it will also be clean to the last speck. Now , you might think its not a big deal if you just pick up one of those books from that neat pile to read , you'll just put it back later. Now , if you happen to be close to the person , he will not mind. Else , he might tell you to keep that back down. In either case , he will certainly feel a tinge of annoyance. This is not because he thinks you will be careless with his belongings. He is mostly afraid that you will disturb the order in which it was originally arranged and he doesn't want to put everything back again.

To make things clear , let me state this. A person suffering from OCD is NOT aggressive or violent , or acts strange in public. He's just ignoring stupid thoughts in his mind and forming plans , slowly , but a completely perfect one , when done.

Also , everyone , yes EVERYONE has OCD in very negligible forms if they dont have it on a larger scale. Example of this : Whenever you set the TV volume or the computer's volume , most of us , always set it in multiples of 5 if say the volume ranges from 0 to 50. Although you may have set it to 33 once , you will , or at least tend to set it to 30 or 35.

SO , through this , we come to an end of another one of my blogs. God , I can't believe I ruined another one of my blogs with stupid random stuff about me. My promise to you - next time , I will post about a more general topic which will be way more interesting.

I probably bragged out a lot about myself in this blog. I did so with the sole motive that I want to know myself to the maximum. What I'm good at and what I'm not. So forgive me if I bored you too much with how great I am and stuff. I wrote this in a stretch so I'm scanning for typos and grammatical errors. Forgive me if you fall across one.

Alright , so did you like this blog? Do you think it was too long? Any inaccurate information? Do you think that I'm wrong and that I'm mistaking something else for OCD, and that I'm not really suffering from it? Want to share your experiences too? Any specific parts about this blog that you liked? Any other thing you might want to tell me?
Just leave a comment below or email me at arvind@enkrypt.in

Ciao

Quote: "Action is the real measure of intelligence." ~ Napoleon Hill
Another Quote: "I think , therefore I am" ~ Rene Descartes

Tuesday, April 3, 2012

This is my Blog. My first Blog.

This post is part of the "First Few Old Blog Posts" archive.
You could expect a certain lack of coherency/maturity from these posts.

When I was younger, I always thought of keeping a book where I could pour my thoughts into when I was in a pensive mood. Well I kept one for a few months too in my 2nd grade. I had lost it a long time ago. And never thought of doing it again. But these days, all I seem to do is think So, here's my blog which allows me to model my thoughts to present to you all and also to keep up with the latest trend of "blogging"

No. I'm not the writing type. You won't catch me carefully writing an essay just for lulz. If my homework demands it, then it would probably just see another one of those retarded writings which are not dissimilar to those of my classmates. Its not that I can't, in fact, i'm pretty sure my levels of creativity are above average, its just that whenever I try, I always feel like I can do better. Unfortunately, I never end up reaching the level of expectation I have for myself since I pay to much attention to even the slightest detail and carving all of them into symbols of perfection can be a bit tiring. So this blog also serves the purpose of allowing me to be creative without really giving much thought about how its presented.

Wow. You just read me rant about my childhood and essays, and you're still reading. You must really like me. Unfortunately, this first blog happens to be related about me and stuff, so since you've read this far, it wouldn't hurt to know more about me now would it?

Right, so I'm a programmer living at Bangalore,India , currently doing his ninth grade at high school. My interests would involve discussing/contemplating anything on the topic of computers, science (mainly physics or biophysics), or mostly Philosophy and Life in general. I am also inclined a bit towards religious symbology and history (Not Indian), this maybe because I've been reading Dan Brown again and again. Oh, i must have forgotten to mention - I read a lot. I just love to read. I've been reading different authors' works but when I read Angels and Demons, I knew that Dan Brown had hit me home. He was my perfect author. Nothing had inspired me more than his books had.

I haven't kept a blog before and I need to start this new habit, so it is hard to tell when I may post again. It can take from a day to a week and also maybe to a month. This post however was restricted to lame talk about me (and you read it all , you're awesome) , however hopefully , the next posts will be more enlightening and really get your attention far better.

Cheers.

Quote: "Genius always finds itself a century too early." ~ R W Emerson