<![CDATA[MOVEQ]]>http://localhost:2368/http://localhost:2368/favicon.pngMOVEQhttp://localhost:2368/Ghost 3.21Mon, 06 Jul 2020 22:25:38 GMT60<![CDATA[AI Advantage]]>If we take any game (chess for example) with a deterministic steps and all opponent data that is known to a computer at the time a game is played, then it simple to determine the AI's advantage. It could be written as the differential equations based on the optimization of

]]>
http://localhost:2368/ai-advantage/5f036b8ddca23ee5d050121cMon, 06 Jul 2020 19:21:42 GMTIf we take any game (chess for example) with a deterministic steps and all opponent data that is known to a computer at the time a game is played, then it simple to determine the AI's advantage. It could be written as the differential equations based on the optimization of the current state of the game, in any given step (\( t_x \)). Given data terms \( D_1 \) and \(D_2 \) and where \(O() \) and \(h() \) are the optimization and heuritic functions respectively. In the case of computer vs. player playing chess, there is not much of a strategy so the heuristic strategy function can be ignored there. \(C_H\) is also the computer-human handicap factor, when the data of the game is not fully know. In the case of chess, all data to make decisions at a given step \( t_x \) is on the board at any given time so a computer-human handicap is not a factor.

AI (CA=Computer Advantage) Eq1: \[ O(D_1) + h(t_x) = CA \]

Player (HA=Human Advantage) Eq2: \[ O(D_2 \times C_H) + h(t_x) = HA \]

For any given step \( t_x \), in a deterministic game like chess, the relative game theory win conditions are simple:

\(  if  CA > HA  then  C  wins  \)

\(  if  HA > CA  then  H  wins  \)

In non-deterministic games, where we have randomness and unknown data in any given step of time, it is possible to introduce an error rate into CA: \( O(D_1 \times E_t) \)

Proposition: If the human player is able to introduce an error rate into optimization function of CA by introducing random noise into \( D_1 \) then the human player is able to increase the effectiveness of his heuristic strategy in the term \( h(t_x) \) in any give step. The interesting thing is that if \( h() \) term is able to create the error term introduced then human-player handicap can disappear in many non-deterministic random games.

Our equations become:

AI (CA=Computer Advantage) Eq1: \[ O(D_1 \times E_t) + h(t_x) = CA \]

Player (HA=Human Advantage) Eq2: \[ O(D_2 \times C_H) + h(t_x) = HA \]

Error Heuristic Eq3: \[ E_t = h_e(t_x) \]

The proposition is based on an assumption that CA optimization \( O(D_1 \times E_t) \) is not able to change from step to step fast enough to optimize for correction due to the introduction of the human-created error noise.

The opposite is also true, if CA can introduce its own noise into the HA optimization function, then the human-player handicap becomes even larger.

The question now is, when does the game become unplayable because of too much noise and fake data introduced into the game by the two players (the human and the computer). But even if the optimizations \(O()\) of CA and HA become unreliable and useless, we are back to who has the best heuritic functions \(h(t_x) \). Even if the rules remain the same for the non-deterministic game, are we still playing the same game then or has the game changed too? :)

The next step is to decompose \( O() \) and \( h() \) into their respective partial differential differential equations with learning rates. Maybe in the end, only the most efficient strategies and simple efficient optimization functions win.

Next proposition:

The learning rate as time reaches infinity of computers and humans is inherently known to be different. Our brains are biological systems. Biological systems are trained through millions of years allowing us to make very optimized decisions even with very limited data in any given step.

In a world where all non-deterministic games have so much random noise that they are virtually unplayable, which player will be able to adapt quicker?

]]>
<![CDATA[Rotating Kops and Hephy Credentials]]>Sometimes you need to rotate all credentials in long-running Kubernetes clusters which are usually created automatically by your deployment tool of choice. This happens as certificates and other automatically created secrets could expire. In my case, this happened because the etcd internal TLS certificate expired.

In the TeamHephy cluster we

]]>
http://localhost:2368/rotating-kops-credentials-and-hephy-secrets/5efe10ca130471bb0edae219Thu, 02 Jul 2020 17:32:00 GMT

Sometimes you need to rotate all credentials in long-running Kubernetes clusters which are usually created automatically by your deployment tool of choice. This happens as certificates and other automatically created secrets could expire. In my case, this happened because the etcd internal TLS certificate expired.

In the TeamHephy cluster we use kops as the deployment tool for AWS and there is a great guide written by the kops maintainers for rotating all the k8s control plane secrets:

Link: Rotate Kops Secrets and Credentials Guide


Resetting your passwords in Hephy Workflow:

(hephy-controller and deis-controller are used interchangeably here)


Case 1: You are not an admin in hephy-controller:

Ask your administrator to exec:  deis auth:passwd --user {your_account}

$ deis auth:passwd --help
Changes the password for the current user.

Usage: deis auth:passwd [options]

Options:
--password=the current password for the account.
--new-password=the new password for the account.
--username=the account's username.


Case 2: You are the one and only administrator in hephy-controller:

Find your deis-controller pod:

$ kubectl get pods -n deis | grep -i "deis-controller"
deis-controller-762839819f-a6fzn                  1/1     Running   0          15d

Execute the command to get into Django managment shell:

$ kubectl exec --namespace=deis -it deis-controller-762839819f-a6fzn ./manage.py shell
Python 3.6.9 (default, Apr 18 2020, 01:56:04) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> 

Now in the interactive management console:

>>> from django.contrib.auth.models import User
>>> u = User.objects.get(username__exact='{your_account_name}')
>>> u.set_password('{new_password_plain_text}')
>>> u.save()

You can then exit by typing exit() or pressing Ctrl-D

Notes:

deis-controller-762839819f-a6fzn is the pod name of the deis-controller.

Modify {your_account_name} and {new_password_plain_text} as you like.

]]>
<![CDATA[A Micro-Soft Joke]]>This post is going to be a retelling of a joke I read in an interview prep book called "Are You Smart Enough to Work at Google?". The joke goes like this...

A pilot was flying around when a technical problem disabled all of the helicopter's electronic navigation and communications

]]>
http://localhost:2368/a-joke/5efcf0bb830d277e4a4ecae3Wed, 01 Jul 2020 21:06:30 GMTThis post is going to be a retelling of a joke I read in an interview prep book called "Are You Smart Enough to Work at Google?". The joke goes like this...

A pilot was flying around when a technical problem disabled all of the helicopter's electronic navigation and communications equipment. The weather and fog were so bad that the helicopter pilot could not tell where he was. Looking around, the pilot was able to see a tall building and he flew towards it, circled around, and held up a sign that said "Where am I?" in large bold letters.

People in the tall building quickly responded by drawing their own sign: "You are in a helicopter".

The pilot smiled, thanked them with a gesture, looked at his map and determined the route back to the airport and landed safely.

After landing the passengers asked the pilot how could he know where to go?

The pilot said: "I knew that building had to be the Micro-soft headquarters, because they gave me technically correct but completely useless answer."

Hahaha!

]]>