+ "execution_count": 17,
+ "metadata": {},
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "('berlinstudwxyzacvfghjkmopq', -5028.125895049484)"
+ ]
+ },
+ "execution_count": 17,
+ "metadata": {},
+ "output_type": "execute_result"
+ }
+ ],
+ "source": [
+ "k7a, fit7a = simulated_annealing_break(c7a, fitness=Ptrigrams)\n",
+ "k7a, fit7a"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {},
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "charlie i think i know what is going on but i need to check a few things before i report we may have\n",
+ "an opportunity here i checked the cipher clerks background and it turns out she is white russian her\n",
+ "family left moscow in but she has relatives in the gulag at perm she clearly has no love for the\n",
+ "soviet government so i am still not sure who she was working for but i think this is key\n",
+ "intelligence in the meantime i have been watching the brits they seem to have been in contact with\n",
+ "our friends in the reichs doktor and they in turn have been watching the french it seems like we are\n",
+ "all working against one another which i really didnt expect and given what we read in the french\n",
+ "document last week i dont think that is a coincidence my own guess is that the russians know what is\n",
+ "going on and that our best hope of uncovering it is to break into their hj and try to find something\n",
+ "there unfortunately according to my source yuri they have taken to using a new cipher solitaire for\n",
+ "archive storage of top secret files so even if we manage to steal the relevant file it will take\n",
+ "alot of computing to break the cipher i attach a brief message from yuri encrypted using an amsco\n",
+ "cipher keyword length is six in which he describes the cipher it is very clever simple to implement\n",
+ "but a devil to crack and my one hope is that we can also find the cipher key while in the hj or\n",
+ "atleast part of it i plan to enter in two weeks on december sixteenth the russians are hosting a\n",
+ "large propaganda event as part of the international ebau ausstellung with leading politburo members\n",
+ "in attendance most of the security team will be occupied with that and hj security will be\n",
+ "relatively light with luck i will get in and out with the files we need that night and then we can\n",
+ "get to the bottom of the whole reichs doktor stratagem all the best harry\n"
+ ]
+ }
+ ],
+ "source": [
+ "print(lcat(tpack(segment(keyword_decipher(c7a, k7a)))))"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {},