# data[].attributes.body
Just to show how the training process looks like

Disclaimer: 100 episodes is hardly enough for solving RL problem, so the performance of the agent is still far from optimal

# data[].attributes.attachment_link.title
First 100 episodes of training a Kurve agent

# data[].attributes.body
Code: https://github.com/greysome/rl
References:
https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf
https://arxiv.org/pdf/1511.05952.pdf
https://www.youtube.com/playlist?list=PLqYmG7hTraZDM-OYHWgPebj2MfCFzFObQ

# data[].attributes.body
30/4: finish implementing Q-learning
7/5: implement Double DQN, prioritised experience replay
14/5: fine-tune the algorithm

# data[].attributes.body
Application: 99%
Machine Learning: 30%

# data[].attributes.body
9 AIs playing against each other because why not (actually they're not even doing anything)

# data[].attributes.body
What have I done?
Pretty much done with implementing the game engine, as well as the front-end

What have I achieved?
I can play games with other people, and I can load AI models to play against

What are the next steps?
Not much, really (probably just polishing the code)

# data[].attributes.body
What have I done?
Define the key operations that the AI will be performing (neural network, loss function, gradient descent optimisation)

Also started working on implementing the Q-learning algorithm

What have you achieved?
Not much, sadly, the AI still hasn't learnt to play well yet

What are the next steps?
Continue to work on the training code. The weights of the AI are converging to the optimal solution very slowly (or it's overshooting). Also implement some features to improve the stability of Q-learning, such as Double DQNs and Prioritised Experience Replay

# data[].attributes.body
https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf
Thing is they have good hardware and lots of time to train their model, while I'm likely going to train mine on a low-end computer, so my input can't have many dimensions (i.e. it can't be a pixel by pixel representation)

I have to figure out a way to reduce the number of dimensions by choosing different features

# data[].attributes.body
The Cognitive Service APIs are actually pretty cool and useful. You can translate, detect entities, and do sentiment analysis.

I wrote a simple program to quickly get translations between languages. To use, first input '<from>;<to>', where from and to are the language codes printed at startup. Then, type whatever text you want to translate. To call the actual translation, input ';' on a new line and press enter.

Just for fun I translated an entire Chinese article into English (https://www.lz13.cn/lizhigushi/22074.html). Here is the output verbatim:

Around First century BC, China was in the period of Wei Three Kingdoms, of which Wei occupied the north, Shu occupied the southwest, and Wu occupied the south. Once, Wei sent an army, from the waterway to attack the director of the river on the edge of the Wu.\u3000\u3000Before long, Wei June to the place not far from the Wu, in the water by the camp, the opportunity to attack. The Marshal Zhou Yu of Wu, after studying the situation of Wei June, decided to use bows and arrows to defend the enemy. But how do you build the 100,000 arrows necessary for combat in a relatively short period of time?\u3000\u3000It took at least 10 days to build so many arrows, according to the craftsman of the then Wu, and it was obviously too long for Wu\'s defense. At that time, Shu\'s Sergeant Zhuge Liang happened to visit Wu. Zhuge Liang was a very clever man, and Zhou Yu asked him how to create the arrows he needed as quickly as possible. Zhuge Liang said to Zhou Yu, three days is OK. We all think Zhuge Liang is talking big, but Zhuge Liang wrote down the military writ, if to the end of the task, will be beheaded. Zhuge Liang was not in a hurry after accepting the task. He said to Lu Su, Minister of Wu, that it is impossible to build so many arrows in a common way. Then Zhuge Liang asked Lu Su to prepare 20 small boats for him, each on board a Sergeant 30 people, the ship all with green cloth for the mantle, and filled with grass, Zhuge Liang and repeatedly asked Lu Su for his ruse to keep secret.\u3000\u3000Lu Su prepared the ship and other necessary things for Zhuge Liang, but did not know the mysteries. Zhuge Liang said three days to prepare 100,000 arrows, but the first day did not see him what movement, the next day is still like this, the third day is about to come, an arrow also did not see, we all for Zhuge Liang Sweat, if the time did not complete the task, Zhuge Liang died. On the third day in the middle of the night, Zhuge Liang quietly put Lu Su into a small boat, Lu Su asked: "What do you invite me to do?" Zhuge Liang said, "Please come with me to get the arrows." Lu Su puzzled and asked, "Where to pick up?" Zhuge Liang smiled and said, "You\'ll know by then."\u3000\u3000"So Zhuge Liang ordered 20 small boats to be connected with long ropes and headed for the Wei June camp. That night, the fog was all over the sky, and the fog on the water was obscure. The greater the fog, the more Zhuge Liang ordered the fleet to move forward quickly. When the fleet approached the Wei Barracks, Zhuge Liang ordered the flotilla to be lined up, and then ordered the sergeant to Linggu and shout on the ship. Lu Su terrified, said to Zhuge Liang: "We only have 20 small boats, more than 300 soldiers, in case Wei Bing call, we will die." Zhuge Liang smiled and said, "I\'m sure Wei Bing won\'t send troops in the fog, so let\'s just drink in the boat." "Besides, in Wei Barracks, I heard Linggu scream, and the manager, Cao Cao, hurriedly called the majors to discuss countermeasures. Finally decided, because the Yangtze river thick fog, do not know the specific situation of the enemy, so sent water Army archers shot arrows, in case the enemy landing. So Wei June sent about 10,000 archers to the river, toward the cry of the place of fierce archery. For a moment, the arrow flew like rain to Zhuge Liang\'s fleet, and moments later, the grass on the hull was covered with arrows. At this time, Zhuge Liang ordered the fleet to turn around and turn the side without the arrow to the Wei June, and soon it was also full of arrows.\u3000\u3000Zhuge Liang estimated that the ship\'s arrows were almost tied, and ordered the flotilla to return quickly, when the fog gradually began to disperse, and when Wei June to find out what had happened, he was remorseful. When Zhuge Liang\'s fleet arrived at the camp in Wu June, Wu\'s manager, Zhou Yu, had sent 500 sergeants waiting to move his arrows, and after an inventory, there were 100,000 arrows in the boat\'s grass. The Marshal Zhou Yu of Wu also had to admire Zhuge Liang\'s wisdom. How did Zhuge Liang know that there would be fog on the water that night? It turned out that he was good at observing the changes in the weather, and after a careful calculation of the sky, he also came to the conclusion that there would be fog on the water that evening.\u3000\u3000In this way, Zhuge Liang used his wisdom to skillfully get 100,000 arrows from the enemy. Sangu story Han end, yellow towel things up, mess to sit down according to the court, Sun Quan Bing Dong Wu, Hanzong room Yuzhou Shepherd Liu Bei listen Xu Shu (famous for Earth) and Sima (also famous counselor) said Zhuge Liang is very knowledgeable, and talented, and Guan Yu, Zhang Fei with gifts to lung (now Hubei Xiangyang County) Wolong gang to ask Zhuge Liang out to help him do things for the country. As it happened that Zhuge Liang went out this day, Liu Bei had to turn back with disappointment. Soon, Liu Bei and Guan Yu, Zhang Fei braved the second time to see the blizzard to please. Unsurprisingly Zhuge Liang went out to wandered again. Zhang Fei did not want to come again, see Zhuge Liang is not at home, urged to go back.\u3000\u3000Liu Bei had to leave a letter expressing his admiration for Zhuge Liang and asking him to come out and help himself save the country\'s dangerous situation. After some time, Liu Bei ate three days of vegetarian, ready to go to please Zhuge Liang. Guan Yu said Zhuge Liang may be an apostle has a false name, may not have the real practical, do not have to go. Zhang Fei, however, argued that he should be called alone, and that if he did not come, he would tie the ground with a rope. Liu Bei scolded Zhang Fei and made a third visit to Zhuge Liang with them. By then, Zhuge Liang was sleeping.\u3000\u3000Liu Bei dare not alarm him, has been standing until Zhuge Liang himself woke up, only to sit down and talk to each other.\u3000\u3000Zhuge Liang saw Liu Bei had the ambition to do things for the country, and sincerely asked him for help, and came out to help Liu Bei establish the Shu Han imperial dynasty.\u3000\u3000"Kingdoms" to Liu Bei three times personally urged Zhuge Liang this matter, called "Sangu." Zhuge Liang in the famous "Out table", there are also "first emperor not to be despicable, lewd self-wronged, (www.lz13.cn) three Gu Sen in the grass. "Sentence. Then the later generations saw that someone had asked the people he admired to come out to help them do things, and when they went to the man\'s house several times in person, they quoted this phrase to describe the desire and sincerity of the urging. That is, not ashamed, the meaning of humbly seeking talent

# data[].attributes.attachment_link.readable_text
import requests as r

key = 'your key here'
header = {'Ocp-Apim-Subscription-Key': key}

URL = 'https://api.cognitive.microsofttranslator.com/translate?api-version=3.0'

keys=' '.join(['lt', 'cy', 'fj', 'hu', 'fi', 'sm', 'et', 'yua', 'mg',
'ar', 'ta', 'lv', 'ht', 'zh-Hant', 'zh-Hans', 'mt', 'ur', 'sr-Cyrl',
'ro', 'hi', 'ms', 'ru', 'uk', 'yue', 'sl', 'nb', 'hr', 'nl', 'otq',
'he', 'tr', 'te', 'sw', 'en', 'ca', 'da', 'de', 'id', 'tlh', 'el',
'to', 'fr', 'it', 'sv', 'ty', 'bg', 'cs', 'vi', 'sr-Latn', 'ja', 'ko',
'is', 'es', 'fil', 'af', 'mww', 'bn', 'th', 'bs', 'pt', 'sk', 'fa',
'pl'])

def translate(from_, txt, to):
    res = r.post(f'{URL}&fr={from_}&to={to}',
                 headers=header,
                 json=[{'Text':txt}])
    return res.json()

text = ''
from_ = line = to = ''

print('keys: ' + keys)
while True:
    query = input()
    if query == ';':
        print('translating...')
        print(translate(from_, text, to))
        text = ''
    else:
        try:
            _from_, _to = query.split(';')
            if _from_ != '-': from_ = _from_
            if _to != '-': to = _to
        except ValueError:
            text += query

# data[].attributes.body
What if you combined
https://www.youtube.com/watch?v=yWppAlI0GY0
and
https://www.youtube.com/watch?v=1o4naC4P8-M
??!!!

Astro Party AI sounds like a pretty interesting idea (but I have to make my own Astro Party game first :( )

# data[].attributes.body
I still don't have any ideas for my project help