<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Warwick Artificial Intelligence - Medium]]></title>
        <description><![CDATA[We aim to teach and educate students at Warwick and around the world about AI methodology and practise. To this end we run interactive workshops and boot-camps, as well as hosting talks from industry professionals. - Medium]]></description>
        <link>https://medium.com/warwick-artificial-intelligence?source=rss----e86a4c6c0ca1---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Warwick Artificial Intelligence - Medium</title>
            <link>https://medium.com/warwick-artificial-intelligence?source=rss----e86a4c6c0ca1---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 02:08:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/warwick-artificial-intelligence" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI in Game Development: How Modern Games are Relying upon AI to drive engagement.]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/ai-in-game-development-how-modern-games-are-relying-upon-ai-to-drive-engagement-6b176995d278?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/6b176995d278</guid>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[game-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[stable-diffusion]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Warwick AI]]></dc:creator>
            <pubDate>Fri, 20 Oct 2023 10:02:51 GMT</pubDate>
            <atom:updated>2023-10-20T10:02:50.719Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>AI in Game Development: How Modern Games are Relying upon AI to Drive Engagement.</strong></h3><p>By Luis Armada</p><h3><strong>Introduction</strong></h3><p>In the modern world, Artificial Intelligence (AI) is reshaping industries across the board and game development is no exception. With tools influencing anything from NPCs to playing environments, AI provides key development applications that drive immersion and engagement. In this article we will delve into the many implementations of AI within game development, alongside the future of this rapidly advancing technology.</p><h3><strong>Current uses of AI in game development</strong></h3><h4><strong>1. Immersing players with AI powered NPCs</strong></h4><p>A key component in developing any quality game is ensuring that user interaction is both enjoyable and engaging. One way in which games achieve this is by introducing “non-player characters” (NPCs), ranging from humans to animals to fictional creatures. However, to drive engagement with these NPCs, developers must incorporate a layer of meaningful interaction between these ‘computers’ and the player.</p><p>Using artificial intelligence (AI), NPCs are ‘brought to life’, enabling them to move and undertake various activities in a scene. The movements of a character are decided with <em>finite state machines </em>[1]<em>,</em> which manage the various <em>states</em> or ‘modes’ of an object. A state can be anything the NPC can do, such as: idle, running, attacking or hostile. These states can only <em>transition</em> or change to another state if specific conditions are met. For example, the state machine in Figure 1 shows an enemy who will transition from idle to moving if it has been idle for too long, or from passive to hostile if the player is too close.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*dgGxaBq0YASs7EoDy-STbQ.png" /><figcaption><em>Figure 1 — A Finite state machine displaying the possible states for an NPC and how to move between them.</em></figcaption></figure><p>Finite state machines are one of the simplest forms of AI models, yet they provide a plethora of possibilities. Character behaviour, decision-making and pathfinding are the simplest examples, but programs are further developed to incorporate character dialogue, complex quest systems and more.</p><h4><strong>2. In-depth player analysis via machine learning</strong></h4><p>Multiplayer games are extremely popular, and with good reason. They connect millions of people around the world through the internet, allowing gamers to play with or against each other on demand. With such an enormous player base, regular maintenance is important to ensure that all players are being provided with the best experience possible. Naturally, this task would be overbearing for humans to manage, requiring constant attention over such a large area. This is another aspect of game development wherein the capabilities of AI can be leveraged.</p><p>Via <em>machine learning (ML)</em>, computers can use mass calculation to determine a rating for every player in a game. This rating is a representation of a player’s skill and general behaviour. Games are utilising ML, teaching it to learn from previous data and accurately decide how to distribute ratings based on known averages. The AI can then discern which players have good behaviour (such as friendly communication) and should be rewarded, and which have bad behaviour (such as communicating rudely or purposely sabotaging games) and should be penalised.</p><p>Move over, multiplayer games frequently feature skill-based matchmaking using this player rating system — providing a more balanced, inclusive, and enjoyable virtual experience. This is accomplished by matching players of similar skill levels, keeping opposing scores close and games fair. This in turn keeps players engaged and encourages a sense of improvement over time. An example of such a system is Microsoft’s TrueMatch [2], which uses ML as well as reinforcement learning (probabilistic models and non-linear optimisations) to adjust matchmaking based on player location and skill level.</p><p>Player analysis is an extremely useful tool which games can use to provide a customised experience to the player. An AI based rating system can also lead to useful applications such as the dynamic provision of suggestions or coaching tips to players — using data mining — or to prevent cheating in multiplayer games.</p><h4><strong>3. Generating compelling storylines and environments with NLP tools</strong></h4><p>The process of designing unique plotlines and gameplay mechanics for an entire video game can oftentimes be a difficult task. Luckily for developers Natural Language Processing models (NLPs) can assist in idea generation, ranging from the conception of game mechanics and environments to entire storylines.</p><p>In essence, NLP is the subfield of AI concerned with enabling computers to understand human language. It works by breaking down the input into <em>tokens</em> and applying statistics gathered through Machine Learning to determine their meaning. NLP has made it easy for users to enter a prompt of what they require, receiving some output that fulfils their needs which saves significant time and energy.</p><p>OpenAI’s ChatGPT is a recent example of an NLP tool that can be used to facilitate the process of game development. ChatGPT is an AI-powered chatbot that — given a prompt from a user — will produce a response by referring to a large dataset of human-written text used to train it. This is a powerful asset for game developers, as it can generate novel and engaging storylines, character traits, game mechanics and more, in a matter of mere seconds.</p><p>Stable Diffusion [3] is another NLP model which can generate photo-realistic images given any text input (Figure 2). This is a valuable resource for developers as it can be used to generate concept art for characters and environments, without having to hire a human concept artist. Naturally, images produced by Stable Diffusion often lack the creative flair in human made art; nevertheless, for those without the resources necessary to hire human artists, the AI generated alternative is more than sufficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*UuWYbOyIdEM1GVL6lXNvuQ.png" /><figcaption><em>Figure 2 — Stable Diffusion’s output when given the prompt “A post-apocalyptic city overgrown with vegetation”.</em></figcaption></figure><h3><strong>The Future of AI in Game Development</strong></h3><p>As displayed, AI plays an important role in the field of game development by making games more interactive, responsive, and easier to design. Given the speed of AI’s development, it is also important to recognise the potential of AI in the game development sector in the near future.</p><h4><strong>4. Building open worlds using generative AI</strong></h4><p>The refinement of existing AI techniques could result in the automation of larger, more complex areas of game development. Previous examples showed a NLP’s capability to generate images of scenes, but what if we could use similar tools to generate the entire 3D environment?</p><p>NVIDIA’s Get3D [4] is one such model that can accomplish this, with the ability to generate high-quality textured 3D models from only a single image (Figure 3). Although this model can only currently reproduce models from its database, it is likely that future developments will surpass this. Figure 3 shows the process of Get3D and the steps it takes to generate a 3D model from the inputted 2D image of a car.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*VRhILm4B26_VOFv7WcgQxQ.png" /><figcaption><em>Figure 3 — How NVIDIA’s Get3D projects textures onto a 3D model to train its natural language processing model.</em></figcaption></figure><p>Taking it a step further, OpenAI’s Point-E [5] can generate digital models consisting of 3D point clouds — a collection of individual points plotted in 3D space. The prompt can further customise the models with descriptions, such as adding accessories or changing colours (Figure 4). In theory, this would save developers an incredible amount of resources, allowing them to expedite prototyping by generating required meshes on the fly. Unfortunately, the model needs more development to produce models at a high enough level of detail or quality for commercial use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*qOLoKTrQV_ydz8JWOheeIw.png" /><figcaption><em>Figure 4 — OpenAI’s Point-E outputs when given a variety of text inputs.</em></figcaption></figure><p>Stable Diffusion, as seen in section 3, is not only capable of AI generated art — with its most cutting-edge implementation producing textures for 3D models. In Figure 5, the technology was used to turn three simple shapes into an entire scene simply with the text prompt ‘sci-fi abandoned buildings’ [6]. With this technology, the effort and time required by a human developer is minimised with little cost to the quality of the result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*G1pNcuXZSkhQH_3_" /><figcaption><em>Figure 5 — Stable Diffusion projecting texture onto blocks to generate an environment, as created by Donald Papp [6] .</em></figcaption></figure><p>A final example is Text2Mesh [7], a tool which adds detail to an existing model by adding colour and small displacements for texture. This model uses a neural network to render multiple 2D images, in conjunction with OpenAI’s CLIP [8], a framework to determine if the resultant model is representative of the actual text prompt provided. Figure 6 shows an example of a simple 3D ring object being turned into a fully textured donut with a single prompt.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*4Xq0SOiN8k8GB07RyHYMUg.png" /><figcaption><em>Figure 6 — How Text2Mesh adds texture to a model using neural networks to render textures upon multiple 2D axes of the 3D shape.</em></figcaption></figure><h4><strong>5. Dynamic character generation and animation</strong></h4><p>As discussed in section 1, the impact that NPCs have on the quality of a game is significant. Their presence and quality can easily distinguish a dull game from an interesting one. However, the process of creating each NPC becomes very time consuming, with developers needing to ensure sufficient variation between each character to accurately simulate real life. The time needed will scale based on the size of the game and its environment, delaying the development process by a matter of years.</p><p>This challenge begs the question: what if we could use AI to dynamically generate unique characters for instant use in the game world? Indeed, this can easily be achieved with a randomiser over each trait on a character creator system. Even so, the development of the character creator system itself could take a long time to perfect and be prone to inaccuracies. The aforementioned technique of producing a 3D model from an image could be applied to animated characters. This could be combined with a model such as the one in thispersondoesnotexist.com [9], which uses machine learning with a generative adversarial network (GAN) to produce novel images of fictitious people. This, in theory, allows a game to include an infinite collection of unique characters without any modelling needed from developers.</p><p>Similarly, could the use of AI be extended to something which cannot be easily described in words — like animation? An interesting existing application has AI teach characters how to walk using reinforcement learning [10]. This technique provides rewards to an AI system for completing certain desirable tasks, therefore incentivising it to collect these rewards and ultimately learn to perform a task without significant human input or training data. In the future, this system could be applied to all necessary animations — for example, to teach characters to realistically move, attack or swim. However, reinforcement learning is difficult to implement and can take a long time to train, with AI systems needing to complete multiple attempts before being able to perform a task correctly. Even after many attempts, the AI could still fail the task — making the system unreliable especially in products with time constraints.</p><h4><strong>6. AI generated soundtracks</strong></h4><p>AI’s capability to write storylines, as discussed, could be extended into the composition of a variety of creative endeavours. For example, composition of music for use in video games.</p><p>Music is often overlooked in gaming however it can be integral to setting the tone of a level. Super Mario, Halo, Tetris: famous games usually have well known soundtracks accompanying them — and this is no coincidence. Better music makes an experience more enjoyable for a player as it sets the mood of a game and drives a deeper immersion. There have already been instances of AI composing music, such as classical [11] and dubstep. However, the composition of an appropriate soundtrack is a task which requires a specific skill set to tailor the music towards the game’s needs. Possibly in the future, soundtracks will be automatically generated to fit right into games without players knowing.</p><h3><strong>Conclusion</strong></h3><p>AI has found its way into all aspects of video games from non-player characters to storyline generation. The capabilities of artificial intelligence and its role in game development have improved and diversified to the point where almost every game released in recent years employs some form of AI. Though this article has discussed its applications regarding NPCs, player analysis and storyline generation, the uses of AI extend to many other areas including procedural level generation as well as virtual and augmented reality games.</p><p>If all the possible future advancements were to be realised, game developers’ jobs would certainly be easier to perform. This is especially true for independent or ‘indie’ game developers, who might lack the funds to hire professional artists. However, all of this leaves the question of whether AI could replace game developers themselves. AI can already write simple programs as seen through models such as ChatGPT, where an AI could program tic-tac-toe in Java simply by giving a prompt. Could AI possibly improve enough so that it can write the code, decorate the environment, make the characters, animations, music, and storyline all on its own? Could games be artificially generated in the future, and would players even realise?</p><p>In conclusion, it is clear these advancements threaten the livelihoods of many professionals in the game development industry. With future AI being able to generate a variety of content already — it is reasonable to question whether the jobs of game developers are at risk, or if the creativity involved in making a game is something that AI will simply never be able to learn.</p><h3><strong><em>References</em></strong></h3><p>[1] Fernando Bevilacqua (2013) Finite-State Machines:Theory and Implementation [online] evatotuts+. Available at: <a href="https://gamedevelopment.tutsplus.com/finite-state-machines-theory-and-implementation--gamedev-11867t">https://gamedevelopment.tutsplus.com/finite-state-machines-theory-and-implementation--gamedev-11867t</a></p><p>‌[2] Microsoft (2017) <em>TrueMatch Matchmaking System </em>[online] Available at: <a href="https://www.microsoft.com/en-us/research/project/truematch/">https://www.microsoft.com/en-us/research/project/truematch/</a></p><p>[3] Stablediffusionweb.com. (2023). <em>Stable Diffusion Online</em>. [online] Available at: <a href="https://stablediffusionweb.com/">https://stablediffusionweb.com/</a>.</p><p>[4] Jun Gao et. al.; (2022) <em>Get3D: A Generative Model of High Quality 3D Textured Shapes Learned from Images. [online] </em>Available at: <a href="https://nv-tlabs.github.io/GET3D/">https://nv-tlabs.github.io/GET3D/</a></p><p>[5] Alex Nichol et. al.; (2022) PointE: A system for generating 3D point clouds from complex prompts. [online] OpenAI. Available at: <a href="https://openai.com/research/point-e">https://openai.com/research/point-e</a></p><p>[6] Donald Papp. (2022) Image-generating AI can texture an entire 3D scene in blender. [online] Hackaday. Available at: <a href="https://hackaday.com/2022/12/18/image-generating-ai-can-texture-an-entire-3d-scene-in-blender/">https://hackaday.com/2022/12/18/image-generating-ai-can-texture-an-entire-3d-scene-in-blender/</a></p><p>[7] Oscar Michel, Roi Bar-On, Richard Liu et. al.; (2021) <em>Text2Mesh: Text-Driven Neural Stylization for Meshes</em> [online] Available at: <a href="https://threedle.github.io/text2mesh/">https://threedle.github.io/text2mesh/</a></p><p>[8] Alec Radford et. al.; (2021) <em>CLIP: Connecting text and images </em>[online] OpenAI Available at: <a href="https://openai.com/research/clip">https://openai.com/research/clip</a></p><p>[9] Phil Wang. (2019) <em>This person does not exist </em>[online] Available at: <a href="https://thispersondoesnotexist.com/">https://thispersondoesnotexist.com/</a></p><p>[10] Insider Tech (2017) <em>Google’s DeepMind AI Just Taught Itself To Walk </em>[online] youtube. Available at: <a href="https://www.youtube.com/watch?v=gn4nRCC9TwQ&amp;ab_channel=InsiderTech">https://www.youtube.com/watch?v=gn4nRCC9TwQ&amp;ab_channel=InsiderTech</a></p><p>[11] Aiva (2019) <em>Romanticism in D minor — AI Composed Music by AIVA </em>[online] youtube. Available at: <a href="https://www.youtube.com/watch?v=03xMIcYiB80&amp;ab_channel=Aiva">https://www.youtube.com/watch?v=03xMIcYiB80&amp;ab_channel=Aiva</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b176995d278" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/ai-in-game-development-how-modern-games-are-relying-upon-ai-to-drive-engagement-6b176995d278">AI in Game Development: How Modern Games are Relying upon AI to drive engagement.</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The technology behind the controversial AI-Generated Art]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/the-technology-behind-the-controversial-ai-generated-art-4ae304ce0ef6?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/4ae304ce0ef6</guid>
            <category><![CDATA[ai-art-generator]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[diffusion-models]]></category>
            <category><![CDATA[dalle-2]]></category>
            <dc:creator><![CDATA[Warwick AI]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 10:02:55 GMT</pubDate>
            <atom:updated>2023-10-16T10:02:55.162Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An article by Derya Çatalyürek.</em></p><p>When you think of art, what is the image that is created in your head? The artist painting a picture in their own style, or an Artificial Intelligence (AI) that has learned all known painting styles — using them to generate unique breath-taking paintings? The creativity associated with art makes AI generated images difficult to grasp however the practice is quickly making its way into modern media [1]. In this article we will explore the most popular tools and how they use AI to produce never-before seen art pieces — some being hard to discern between human or artificially made.</p><h3><strong>An introduction to AI-Generated Art</strong></h3><p>AI-generated art refers to art that is created using a variety of Artificial Intelligence algorithms — ranging from simple techniques that use pre-designed templates or styles, to more advanced techniques that use Machine Learning (ML) to generate original artwork. There are diverse perspectives and viewpoints on AI-generated art; some people find it to be very attractive and innovative due to its unique and abstract style, while others believe that AI-generated art is lacking the human touch or emotional depth that is present in art created by human artists.</p><h3><strong>OpenAI and DALL-E</strong></h3><p>OpenAI is the company responsible for many products at the forefront of AI development, notably ChatGPT which takes large amounts of real-world data for the training of a powerful unsupervised text generation model. In January 2021 OpenAI introduced DALL-E [2], a system that can generate images from user-given text prompts. The name of DALL-E originates from the famous surrealist artist Salvador Dali combined with the Pixar Animation robot: Wall-E. DALL-E produces a range of outputs from whatever the user requests — from original, photo-realistic images to art imitating painting styles. Alongside its more obvious uses, DALL-E has provided a key resource for AI researchers, helping humans understand how advanced AI systems see and understand our world.</p><p>DALL-E can take what it has learned from a variety of other labelled images and then apply it to its work — for example, given a picture of a dolphin it can infer what a dolphin would look like in different situations or scenarios (Figure 1). However, if we input a word or situation it hasn’t learned yet, DALL-E is only able to give the best idea of what that word could mean. DALL-E allows you to further customise images by adding more prompts post-generation — allowing you to modify shadows, reflections, and textures.</p><p>The implementations of DALL-E range far and wide — not only being used to create art but also in commercial careers such as marketing and advertising. The use of DALL-E not only allows for the creation of images that aren’t currently available but also produces a final product significantly quicker than its human counterpart. DALL-E could also be utilised in the medical field to create detailed images of organs and other internal structures for use in research and education.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-RAQ_d05w81-RDgz" /><figcaption><em>Figure 1 — DALL-E Output when given the prompt “A dolphin reading a book underwater”.</em></figcaption></figure><p>DALL-E possesses a chilling ability to impersonate and create artworks in the distinctive styles of famous painters. Replicating popular styles in scenarios and environments in which the painter has never worked before. DALL-E accomplishes this through leveraging its deep learning and pattern recognition abilities to analyse the styles and nuances of renowned artists’ techniques, brushstrokes, and colour palettes -enabling the model to produce paintings eerily similar to the artist’s own creations. An example of this ability is given in Figure 2; one is an actual painting of the famous painter Monet and the other one is DALL-E when given a prompt to impersonate the style of Monet. Can you guess which one is the original Monet?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*zsw5Ji80jdBk04wIpR1STw.png" /><figcaption><em>Figure 2 left — The Monet Family in Their Garden at Argenteuil Spring- Claude Monet (1875), right — DALL-E output when given the prompt “An oil painting of people in a garden by Monet”</em></figcaption></figure><p>This capability to analyse and reproduce paintings can be viewed as both exciting and somewhat alarming. DALL-E not only explores the immense potential of AI in the art realm but also invites us to stretch the boundaries between human and machine creativity — ushering in a new era of art. The distinction that some individuals can find between art crafted by humans and AI is poised to diminish progressively as the technology improves — until perhaps one day all AI-generated art is indistinguishable from human creations.</p><p>DALL-E was created by training a Neural Network on images and their text descriptions [3]. Neural Networks are like a human brain for computers, instead of our brain’s neurons, the computer’s brain is made up of interconnected layers of nodes that each have an associated weight and transmit data to make decisions. Deep Learning uses Neural Networks with many hidden layers to solve various complicated problems. Through Deep Learning it gains the knowledge of what objects are and the relationships between them. A method called “diffusion modelling” or “stable diffusion” allows the AI to turn this knowledge of objects and the prompt into an image for the user [4]. Stable Diffusion starts with randomly placed dots and progressively transforms them using these key elements until it reaches its target — a finished image that should resemble the user’s original prompt. Using OpenAI’s text classification algorithms, it splits the prompt into its key elements which can be used as a Stable Diffusion prompt.</p><p>DALL-E is an example of how humans and intelligent systems can work together towards creative applications of AI that empower our ideas &amp; potential. Although the possibilities of this technology are endless, we cannot yet foresee the consequences of such powerful technology in the hands of malicious people. For this reason, the creators of DALL-E have limited its ability to create violent, hateful or adult content and also state that they are working to prevent the AI from producing photorealistic versions of faces, including those of famous people. The hope of OpenAI is to maintain DALL-E as a safe technology whilst not restricting its original use as a tool for unrestricted creativity.</p><h3><strong>How can an AI create images?</strong></h3><h4><strong>Generative Adversarial Networks</strong></h4><p>Generative Adversarial Networks (GANs) are the first of the two standard methods used to generate images [5] — consisting of an algorithmic architecture and two sub-models or neural networks.</p><p>The first model in a GAN, known as the generator, creates an image based on the text input by the user [6]. The second model (the discriminator) is used to train the first model, ensuring that the generated images are similar in style and content to similarly themed images within its dataset. This second model aims to decide whether or not the image it is fed is real or fake — i.e. is it generated by the first model or not. Using this tool, the first model can create images to be fed to the discriminator. At first, all images will be flagged as fake and the generator is informed that the image was not realistic. This feedback is given to the first model to use for future generations and expand the AI’s knowledge, producing images that are more realistic and closer to the dataset materials over time. As the first model improves, the second general network will find it difficult to differentiate between the real and the fake. When the first model is ‘realistic’ or trained enough the second model is discarded as it is no longer needed.</p><p>An example of such a model is ThisPersonDoesNotExist [7]- a website that generates a random face of someone who ‘does not exist’ by learning facial structures from a large dataset of existing people [8].</p><h4><strong>Diffusion Models</strong></h4><p>As AIs are often very difficult to train, networks with a small dataset often produce the same images over and over. Having a network that produces the same images each time is not very interesting or beneficial for the user, therefore randomness is required to make sure each experience is unique.</p><p>So the new problem: how do you generate a dataset large enough to train a network? Diffusion models aim to solve this issue by taking an entirely different approach, by employing noise [9]. Adding noise is the process of deliberately altering pixels to be different than what they previously represented. Adding randomness and noise helps to ensure that each generated image is distinct. In diffusion modelling, noise is added to an image to remove key identifiable data [10]. The model will then attempt to recover the data by independently reversing the noise adding process; this is known as ‘denoising’. At the start of the process, a small amount of noise is added, making it easy for the model to ‘denoise’. Over time more noise is added until eventually the model will be able to recover the original image from an image containing only random pixels.</p><p>There are different strategies on the amount of noise we apply to the original image, such as: progressively increasing the noise (linear), or starting with small noise and then dumping loads at the very end. To map the amount of noise to each step, we use a schedule: given an image at time t=0, each time unit until time t = T can be assigned an amount of noise according to the chosen strategy. We can then very easily produce the image wanted with the right amount of noise at each stage t in the schedule. .</p><p>To visualise the process of noise adding see Figure 3, where Gaussian noise is employed to add randomness to an image. This method uses a mathematical function to add random values to the input data, in this case the colour values of each pixel [11]. On the left of the figure, Gaussian noise is added to an image to add variety — the first step in diffusion modelling. On the right we can see the process of ‘denoising’ as the model removes noise from a random image until it resembles the target image. It is important to understand how noise affects images in order to develop effective noise reduction techniques.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/0*vdybbIy-85zP9a1u" /><figcaption><em>Figure 3 — Gaussian noise being added to an image of a classroom environment (left) and noise being removed from random pixels to depict the same image (right).</em></figcaption></figure><p>The aim now is to deploy a network that can undo this process. Intuitively, it is easier to remove the noise step by step. Taking the image with noise, we predict the amount of noise added by comparing to an estimate of what the original image was. From there we can remove as much noise as needed to get to the previous step. This process is iterated a number of times, getting closer and closer to the original image.</p><p>To generate images based on text input such as DALL-E, we condition this network by also giving it access to the text — taking text and embedding it using the GPT-3 style Transformer Embedding [12]. This technology takes some inputted text and uses decoders to understand each word’s meaning. From here it can ‘transform’ the text as required — in this case into an image. It can use this prediction image instead of a target image to add and remove noise in the training stage.</p><p>In summary: we start with a clean target image and add noise to it. Noise is progressively added until the original image cannot be detected. The noise is then gradually removed from this seemingly random image until we end up back at what the network thinks the target image was. This often does not perfectly match the target image, having similar features and themes but giving the AI-image generation a sense of randomness that other methods do not possess.</p><p>If we take a look at Figure 4 — showing DALL-E when given the input “a bowl of fruits by the window” — we can observe how each generated output shares a common theme but possesses their unique characteristics. This effectively demonstrates the randomness involved in Generative AI, as the outputs exhibit different lighting conditions influenced by factors such as the position of the sun or the chosen perspective for capturing the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QMjVH46N4X69JwBY" /><figcaption>Figure 4 — DALL-E output when given prompt: “a bowl of fruits by a window”. Displaying four different images that represent the same prompt.</figcaption></figure><h3><strong>Conclusion</strong></h3><p>As the technology grows, the quality of AI-generated art will depend more upon the specific algorithms and techniques used to create it than the dataset it is trained upon.</p><p>As with any art form, some AI-generated art may be more successful in capturing the viewer’s attention and evoking an emotional response than others; nevertheless the fundamental element of art is the feelings it blossoms in a person. These feelings are different for everyone, no one person can feel the same emotions looking at a painting as another, therefore artists do not have a specific target audience.</p><p>Regardless of one’s personal opinion on AI-generated art, it is important to recognize that it represents a rapidly developing field that has the potential to revolutionise the world of the creative arts. The decision to embrace and harness the use of these technological advancements for personal growth and education is a matter of individual choice as we navigate their integration into our lives.</p><h3><strong>References</strong></h3><p>[1] McFadden, C. (2023). <em>The rise of AI art: What is it, and is it really art?</em> [online] Interesting Engineering. Available at: <a href="https://interestingengineering.com/culture/what-is-ai-generated-art">https://interestingengineering.com/culture/what-is-ai-generated-art</a>.</p><p>[2] OpenAI (2022). <em>DALL-E 2. </em>[online] Available at: <a href="https://openai.com/dall-e-2">https://openai.com/dall-e-2</a>.</p><p>[3] Ryan O-Conner (2023). <em>How DALL-E 2 Actually Works </em>[online] AssemblyAI. Available at: <a href="https://www.assemblyai.com/blog/how-dall-e-2-actually-works/">https://www.assemblyai.com/blog/how-dall-e-2-actually-works/</a>.</p><p>[4] Kevin Pocock (2023). <em>Does Dall-E Use Stable Diffusion? </em>[online] PC Guide. Available at: <a href="https://www.pcguide.com/apps/does-dall-e-2-use-stable-diffusion/#:~:text=Dall%2DE%202%20uses%20stable,realistic%20and%20natural%2Dlooking%20images">https://www.pcguide.com/apps/does-dall-e-2-use-stable-diffusion/</a>.</p><p>[5] Kundu, R. (2022). <em>AI-Generated Art: From Text to Images &amp; Beyond [Examples]</em>. [online] v7labs. Available at: <a href="https://www.v7labs.com/blog/ai-generated-art">https://www.v7labs.com/blog/ai-generated-art</a>.</p><p>[6] Jason Browniee (2019) <em>A Gentle Introduction to Genarative Adversarial Networks (GANs) </em>[online] Machine Learning Mastery. Available at: <a href="https://machinelearningmastery.com/what-are-generative-adversarial-networks-gans/">https://machinelearningmastery.com/what-are-generative-adversarial-networks-gans/</a></p><p>[7] Phillip Wang (2019). <em>This Person Does Not Exist. </em>[online] Available at: <a href="https://thispersondoesnotexist.com/">https://thispersondoesnotexist.com/</a></p><p>[8] Danny Paez (2019). <em>‘This Person Does Not Exist’ Creator Reveals His Site’s Creepy Origin Story. </em>[online] Inverse. Available at: <a href="https://www.inverse.com/article/53414-this-person-does-not-exist-creator-interview">https://www.inverse.com/article/53414-this-person-does-not-exist-creator-interview</a></p><p>[9] Sabre PC (2023) <em>GANs vs Diffusion Models — Generative AI Comparison. </em>[online] Available at: <a href="https://www.sabrepc.com/blog/Deep-Learning-and-AI/gans-vs-diffusion-models">https://www.sabrepc.com/blog/Deep-Learning-and-AI/gans-vs-diffusion-models</a></p><p>[10] Vivek Muppalla, Sean Hendryx (2022) <em>Diffusion Models: A Practical Guide. </em>[online] Scale. Available at: <a href="https://scale.com/guides/diffusion-models-guide">https://scale.com/guides/diffusion-models-guide</a></p><p>[11] AI TutorMaster (2023) <em>What is Gaussian Noise in Deep Learning? How and Why is it used? </em>[online] PlainEnglish. Available at: <a href="https://plainenglish.io/blog/what-is-gaussian-noise-in-deep-learning-how-and-why-it-is-used">https://plainenglish.io/blog/what-is-gaussian-noise-in-deep-learning-how-and-why-it-is-used</a></p><p>[12] Baeldung CS (2023) <em>Transformer Text Embeddings. </em>[online] Available at: <a href="https://www.baeldung.com/cs/transformer-text-embeddings">https://www.baeldung.com/cs/transformer-text-embeddings</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4ae304ce0ef6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/the-technology-behind-the-controversial-ai-generated-art-4ae304ce0ef6">The technology behind the controversial AI-Generated Art</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The End of the “Star Player”: How AI is changing the world of Football]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/the-end-of-the-star-player-how-ai-is-changing-the-world-of-football-b4ffe23b753b?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/b4ffe23b753b</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[strategy]]></category>
            <category><![CDATA[game-theory]]></category>
            <category><![CDATA[football]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Warwick AI]]></dc:creator>
            <pubDate>Mon, 09 Oct 2023 09:46:49 GMT</pubDate>
            <atom:updated>2023-10-09T09:46:49.344Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An article by Avazbek Isroilov</em></p><p>It is often believed that having one of the world’s most skilled players decides the fate of an entire football team. We have seen this in many modern teams, with players such as Lionel Messi, Cristiano Ronaldo, and Neymar, who seem to be the driving force leading their squad to victory. However, through artificial intelligence (AI), it has been demonstrated that this theory may not always be true. With machine learning algorithms, a team can still reach the finals in the absence of such players, provided the coaches use the available data effectively.</p><p><strong>Approach</strong></p><p>To maximise the information gain and quality of analysis, we are going to use machine learning and game theory in conjunction.</p><p><strong>Machine learning (ML)</strong> allows computers to learn from experience and improve their performance on a task over time. It involves feeding a computer a large amount of data and using algorithms (e.g. K-means clustering) to identify patterns in that data.</p><p><strong>Game theory (GT)</strong> is a branch of mathematics and economics that studies how people make decisions when interacting with others. GT models can help us predict the behaviour of individuals or groups in different scenarios and can help identify the most effective strategies to achieve our desired outcomes.</p><p><strong><em>Analysis of Penalty Kicks</em></strong></p><p>Game theory and machine learning converge when there is a need to make suitable decisions in a multi-agent environment — such as football with multiple players making decisions at any one time. By analysing player-specific statistics — for instance, their number of successful passes and shots from different positions — we can predict how different types of players behave or make decisions in penalty kick scenarios. This is achieved by first quantifying individual players’ playing styles, for both penalty takers and goalkeepers , grouping them into different categories using clustering techniques. This allows teams to form evidence-based predictive games for each cluster.</p><ol><li><strong>Quantifying players’ styles:</strong></li></ol><p>Data is formatted to allow for easy interpretation by both coaches and machine learning systems. To do so, we use ‘player vectors’ [1] to characterise the playing styles of penalty takers using data across 18 dimensions. Each component in the ‘player vector’ corresponds to the weighting which quantifies a player’s ability in that specific technique (e.g. Center Pass: 0.2). Since ML models only require vectors which consist of numbers, the ‘player vectors’ can be analysed by machine learning algorithms while also providing a visual aspect for coaches as seen in Figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*TYy93aH0iuk06dg9" /><figcaption><em>Figure 1 Example of Player Vectors. (Left) R.Lewandowski, the central striker showed high weights (red dot) for C2: close shot, C13: center dribble, and C14: Center Pass. (Right) Jesus Navas, right winger shows high weights for C8: Right Backline Cross, C12: Right flank dribble, and C18: Right flank pass. The meaning of each component of the vector can be found in a paper written by Decroos &amp; Davis, 2019 [1].</em></figcaption></figure><p>2. <strong>Using Clustering to group common characteristics:</strong></p><p>Using a total of 635 such vectors for individual players, we divide them into 6 groups using K-means clustering [2] — which groups vectors by similar characteristics. Using Principal Component Analysis [3], we reduce the 18-dimensional player vectors to both a 3D and 2D graph, as seen in Figure 2, to be able to visualise this output. In Figure 2a<em>, </em>the goalkeeper (Cluster #3) suffers from insufficient data and Cluster #6 is an outlier — this cannot be inferred from the diagrams however the paper (Tuyls et al.) from which these diagrams are sourced [4] discuss this in more detail. These clusters will therefore be removed from further analysis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tFp4RFvYxXjaXwax" /><figcaption><em>Figure 2 Result of the clustering process. (a) The result of clustering is shown in 3D. (B) The result of clustering is shown in 2D with the anomalous clusters removed.</em></figcaption></figure><p>3. <strong>Game theoretic analysis:</strong></p><p>We conduct game-theoretic analysis for each cluster. Examining the Nash strategies [5] played by each cluster gives the result seen in Figure 3. A Nash strategy involves determining the best course of action for an individual based on what they believe other players will do. Specifically, it involves identifying a set of actions that maximise the player’s expected outcome, assuming that other players will choose their best possible response.</p><p>From the analysis, penalty takers in all clusters are recommended by Nash to shoot more to their natural sides than to their non-natural sides. However, the recommended strategy for penalty takers in Cluster #1 is quite balanced between natural and non-natural shots.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*IySRXcnVAMxce9I5" /><figcaption><em>Figure 3 Nash probabilities and empirical frequencies for Shot (S) and Goalkeepers (G) with Natural1 (N) and Non-Natural (NN) actions.</em></figcaption></figure><p>In addition to analysing Nash probabilities, the patterns of positions for successful goals are also visualised in Figure 4. As seen below, penalty takers in Cluster #2 in Figure 4 tend to score mostly to the bottom left corner of the goalmouth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*FEmTRBkplAzhuqwm" /><figcaption><em>Figure 4 Heatmaps of goals by all kickers and kickers in individual clusters for empirical probabilities.</em></figcaption></figure><p><strong><em>Generative trajectory prediction for counterfactual analysis</em></strong></p><p>Generative trajectory prediction models are a type of machine learning model that aims to predict the future movements of players based on their past trajectories.</p><p>A possible way of training such a model would be to provide an input context to such a model (e.g. consisting of the positions of the ball, defenders, attackers, etc.), and subsequently predict the future trajectories of players. Figure 5a [6] shows predicted behaviours of players conditioned on such an input context. The example shown was trained using the most basic predictive model, consisting of a centralised Long-Short Term Memory (LSTMs). This takes an input of raw trajectories of players and the ball, and predicts the step-by-step change in trajectory of the defensive players as an output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1xUs-6QCtQWBMuea" /><figcaption><em>Figure 5 (a) Shows the predictions of players’ trajectories given players’ and ball’s original positions (b) Shows the situation where the ball’s trajectory is perturbed (faked) to infer the defender’s movements. This case is used for counterfactual analysis.</em></figcaption></figure><p>A key advantage of generative predictive models is that they can be used for counterfactual analysis.</p><p><strong>Counterfactual analysis</strong> is a type of analysis that involves exploring what could have happened if things had been different in the past, allowing you to adapt your future gameplay against similar opponents.</p><p>Figure 5b illustrates an example where the trajectory of the ball is ‘faked’ to see how the defender might react. Based on the knowledge of the defenders’ movements, an educated strategy can be made to maximise the probability of a shot at the goal.</p><p>The above-mentioned approaches are one of the underlying aspects to develop an Automated Video Assistant Coach (AVAC), a system capable of processing raw broadcast video footage and accordingly advising coaching staff in pre- and post-match scenarios.</p><p><strong>Conclusion</strong></p><p>The integration of AI into football can be expected to transform the future of this sport, with the focus leading away from individual ‘star players’ and more towards the team as a whole. On top of this, there is potential for an entirely new role to be introduced into football teams: AI engineers working behind the scenes on the strategy of the team at every move. These engineers will employ the AVAC (Automated Video Assistant Coach) system discussed above to help the coaches plan new advanced strategies for their games, completely changing the approach to strategy in football. But is the world of football ready for this shift? Only time will tell if the teams, and importantly, the fans, will support these new changes.</p><p><strong>References</strong></p><p>[1] Decroos, Tom, and Jesse Davis. <em>Player Vectors: Characterizing Soccer Players’ Playing Style from Match Event Streams</em>. doi: <a href="https://www.ecmlpkdd2019.org/downloads/paper/701.pdf">www.ecmlpkdd2019.org/downloads/paper/701.pdf.</a></p><p>[2] Education Ecosystem (LEDU) “Understanding K-means Clustering in Machine Learning” <em>Towards Data Science, </em>Sept 2018 doi: <a href="https://towardsdatascience.com/understanding-k-means-clustering-in-machine-learning">https://towardsdatascience.com/understanding-k-means-clustering-in-machine-learning</a></p><p>[3] Casey Cheng “Principal Component Analysis (PCA) Explained Visually with Zero Math” <em>Towards Data Science, Feb 2022 </em>doi:https://towardsdatascience.com/principal-component-analysis-pca-explained-visually-with-zero-math</p><p>[4] Tuyls, Karl, et al. “Game Plan: What AI Can Do for Football, and What Football Can Do for AI.” <em>Journal of Artificial Intelligence Research</em>, vol. 71, May 2021, pp. 41–88, doi:<a href="https://doi.org/10.1613/jair.1.12505">https://doi.org/10.1613/jair.1.12505</a>.</p><p>[5] David L. Pool and Alan K. Mackworth, “Artificial Intelligence 2E: Foundations of Computational Agents”, <em>Cambridge University Press, </em>2017. doi: <a href="https://artint.info/2e/html2e/ArtInt2e.Ch11.S4.html">https://artint.info/2e/html2e/ArtInt2e.Ch11.S4.html</a></p><p>[6] Le, Hoang, et al. <em>Data-Driven Ghosting Using Deep Imitation Learning</em>. Doi: <a href="http://www.yisongyue.com/publications/ssac2017_ghosting.pdf">http://www.yisongyue.com/publications/ssac2017_ghosting.pdf</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4ffe23b753b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/the-end-of-the-star-player-how-ai-is-changing-the-world-of-football-b4ffe23b753b">The End of the “Star Player”: How AI is changing the world of Football</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Revolutionising the Fashion Industry through AI: Optimising Business Processes and Sustainability]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/revolutionising-the-fashion-industry-through-ai-optimising-business-processes-and-sustainability-9faef9615750?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/9faef9615750</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[fashion]]></category>
            <category><![CDATA[supply-chain-solutions]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[retail-technology]]></category>
            <dc:creator><![CDATA[Warwick AI]]></dc:creator>
            <pubDate>Fri, 06 Oct 2023 10:01:24 GMT</pubDate>
            <atom:updated>2023-10-06T10:01:24.215Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An article by Anna Pang</em></p><p>Artificial intelligence (AI) is revolutionising the world of fashion, impacting everything from trends in manufacture to customer experience.</p><p>Most people’s minds will gravitate towards AI’s most common commercial use — automated manufacturing processes. This can lead to faster and more efficient production, as well as increased flexibility in responding to changes in consumer demand. Corporate responsibility increases engagement in sustainability, driving the development of new materials from natural resources by using AI technologies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*XdJzSu90CdZgJZMb" /></figure><p>However, AI can also be used in more technical and even creative areas — such as optimising business strategy and consumer experience. One of the key benefits of AI in fashion is its ability to analyse large amounts of data and make predictions about consumer behaviour. This helps retailers to target their marketing campaigns and product offerings more effectively, leading to increased sales and customer loyalty.</p><p>The most innovative of these ideas allows customers to virtually try on clothes before purchasing them through styling and fitting tools. This greatly improves the online shopping experience whilst also impacting a company’s environmental impact by reducing the need for returns, helping to reduce quantity in production and carbon footprint.</p><p>With the AI fashion market expected to grow to $2.66 in 2026 at a compound annual growth rate (CAGR) of 4.2% <em>(ResearchAndMarkets Report, 2022)</em>, is the fashion industry obliged to embrace the integration of big data and new technologies to maintain relevance and long-term commercial success?</p><h3><strong>Automation in Retail</strong></h3><p>Paying for your items without the frustration of scanning barcodes, stagnant queues, or cashier interaction is a problem solved by the current media target — Amazon Fresh. However, they are not the only businesses employing AI in this area with clothing stores, such as Uniqlo, also taking suit. Store automation acts on instant detection and calculation of the exact items you intend to purchase. Automating the common clothing store does not have to be overly complex to be effective; they just need to evoke a sense of satisfaction.</p><p>Multiple in-store operations are improved by a combination of AI technologies such as computer vision, machine learning, and Radio-Frequency Identification (RFID) tracking (Turbide, 2016). Computer vision can be used to track inventory by using cameras to scan and identify products and machine learning can be used to predict sales trends and make recommendations to customers. RFID tags can be placed on products to track their location within the store and monitor inventory levels in real time<em> (Mcdowell, 2021)</em>.</p><p>Virtual reality mirrors will transform our perception of style, creating a more personalised and interactive shopping experience. This can include features such as virtual try-on, personalised styling, and size recommendations. When AI helps consumers determine intricate details such as fabric texture or colour palettes, they become more accustomed to experiment around a desired look.</p><p>In terms of augmented reality, these mirrors use a combination of 3D scanning, computer vision, and machine learning to create a realistic and personalised virtual try-on experience. 3D scanning — used to create a detailed model of the clothing — alongside computer vision — which tracks the customer’s body movements — can give the user an image of themselves wearing the products that the store provides. Machine learning further enhances this experience by generating personalised styling recommendations based on the customer’s preferences and body type <em>(TextileToday, 2022)</em>.</p><p>In many ways, this technology will make retail workers’ lives a lot easier, however these changes can make workers significantly more vulnerable to redundancy. It is important to note that retail jobs are already in decline due to the sharp increase in e-commerce and online services, escalating to new levels during Covid-19. The UK saw a loss of 83,000 jobs (or a decline of 2.7%) compared to a year ago and a loss of 135,000 compared to three years ago (4.4%)<em> (Retail Job Report, 2022)</em>. Therefore, forecasting and managing various risks is key when fashion revolves around AI.</p><p>Clearly, the impact of these technologies on the clothing industry will be revolutionary. Automation can lead to increased efficiency and cost savings for retailers, while augmented reality mirrors can enhance the shopping experience and drive sales. It could also lead to increased personalisation and convenience for customers, and potentially reduce the need for physical retail spaces — reducing jobs for low-skilled workers.</p><p>This is inevitable for any industry however, a technologically evolving world will drive the development and upskilling of our workforce. An increase in technical adeptness helps us find solutions to address the labour intensive and ‘undesirable’ aspects of the commercial fashion world. This — at its foundation — is an inequality issue due to the push towards the need for high-quality education, which benefits the privileged and isolates the poor.</p><h3><strong>Supply Chains</strong></h3><p>But why are machine learning algorithms so beneficial for supply chains <em>(Burgess, 2021)</em>? Because it introduces a new wave of sustainability — something the world of fashion is itching for. Both investors and the public are striving for greener companies to buy from, and the intensification of Environmental, Social and Governance (ESG) requirements fundamentally change the way companies and businesses operate.</p><p>One of the many sustainable steps may occur through the synthesis and production of materials. Analysing and predicting the properties of different materials based on their chemical composition allows for the creation of sustainable materials with specific desired properties. Integrating these technological processes into business models has the potential to increase the quantity of raw materials which produce high-quality goods at more affordable prices.</p><p>AI-synthesised materials can offer new and unique sustainable alternatives to traditional materials like cotton <em>(Wolhuter, 2021)</em>, reducing the environmental impact of the fashion industry. In terms of supply chains, AI can be used to optimise logistics and production processes, reducing waste and emissions. This can lead to more efficient use of resources and a reduction in the cost of goods.</p><p>Businesses can use AI to analyse consumer data and predict market trends, allowing them to adjust pricing strategies according to supply and demand <em>(Burgess, 2021)</em>. Additionally, the use of sustainable materials and efficient production processes can result in lower costs for businesses, which can be passed on to consumers in the form of lower priced products. It can be argued that, because of this, permitting our personal data to be stored by companies is benefiting all of us in the long run.</p><p>Many companies are already adapting to this new technology, using AI to develop clothing fabrics and materials that are more sustainable and cost-effective. Bolt Threads is just one of these companies, using AI and biotechnology to create sustainable, high-performance fabrics from mushrooms. Their proprietary technology allows them to optimise the properties of the fabric to meet specific performance criteria, while moving away from toxic processes, petroleum-based polymers, and non-biodegradable materials. Their sustainability efforts reach past this, also using AI to monitor and control the production process to reduce waste and emissions <em>(Rao, 2015)</em>.</p><p>WG Flex has also joined the trend with their sustainable activewear line. With AI, the company can develop sustainable, performance-driven fabrics that are made from recycled plastic bottles. Their technology allows them to create fabrics with specific properties, such as moisture management, UV protection, and stretch recovery. Like Bolt Threads, their uses of AI reach outside of materials — with AI being employed to optimise production processes to reduce waste and emissions<em> (WG Blog, 2022)</em>.</p><p>AI is also hitting more mainstream companies like H&amp;M and Zara where it is being is used to predict trends through capturing information on search engines and blogs. AI helped H&amp;M restock popular merchandise to reduce company waste and make more sustainable decisions. According to their CEO in 2019, Karl-Johann Persson reported that H&amp;M’s venture had “significantly improved the company’s ability of trend prediction” <em>(Nikolopoulos, 2022)</em>.</p><h4><strong>Challenges</strong></h4><p>Controversially, AI implementation in fashion isn’t as glamourous as it seems. The technology is still relatively new and there is a lack of standardisation in the industry which makes it difficult for companies to compare and evaluate different materials and technologies.</p><p>Moreover, the cost of using AI technology can be high, with a lack of infrastructure and resources in place to support the development and commercialisation of these materials. As many consumers still prefer traditional materials like cotton and polyester, companies find it difficult to sell these new and different materials. The lack of consumer awareness about the benefits of these materials makes it difficult for companies to justify the investment, especially when there is no guarantee that users will like the change. Finally, there are regulatory challenges, such as a lack of clear guidelines on how to test and certify these new materials, which may make it difficult for companies to bring these products to market<em> (Rogovskiy, 2021)</em>.</p><p>Despite these challenges, the rapidly developing nature of AI means this technology will no doubt play a key role in reducing human error and improving the speed and accuracy of various tasks like sourcing materials, tracking inventory, and supply chain management. The implementation of AI in businesses relies on business acumen. Therefore, it is a question of business adaptability and investment strategy to create market opportunities which lead to long-term commercial success.</p><h3><strong>Conclusion</strong></h3><p>The world is opening its eyes to sustainable and ethical fashion. AI revolutionises the industry by leading businesses towards the optimisation of sustainability, commodities, and cost — being set to transform new business strategies and widen the dimensions of customer experience. By analysing customer data, creating virtual fitting tools, and automating production processes, AI can help fashion companies to better understand their customers, to target or expand their brand, and create more personalised, efficient, and innovative products. The integration of AI is proving to become much more than a profitability strategy for the future of the industry.</p><p><em>While fashion is a vehicle for this environmental, psychological, and cultural shift — artificial intelligence is the driver for the permanent redesign and reengineering of today.</em></p><h4><strong>References</strong></h4><p>Adsul, R. (2020). <em>How AI Is Revolutionizing The Fashion Industry</em>. [online] Available at: <a href="https://www.linkedin.com/pulse/how-ai-revolutionizing-fashionindustry-part-1-riya-adsul/">https://www.linkedin.com/pulse/how-ai-revolutionizing-fashionindustry-part-1-riya-adsul/</a>.</p><p>BOF Studio (2022). <em>How Fashion Retailers Use AI to Optimise E-Commerce and Consumer Experience</em>. [online] The Business of Fashion. Available at: <a href="https://www.businessoffashion.com/articles/technology/how-fashion-retailers-use-ai-to-optimise-e-commerce-and-consumer-experience/">https://www.businessoffashion.com/articles/technology/how-fashion-retailers-use-ai-to-optimise-e-commerce-and-consumer-experience/</a>.</p><p>Burgess, M. (2021). <em>The AI that fashion is using to reinvent itself</em>. [online] Wired UK. Available at: <a href="https://www.wired.co.uk/article/ai-personalised-shopping">https://www.wired.co.uk/article/ai-personalised-shopping</a>.</p><p>Markets, R. and (2022). <em>AI in Fashion Global Market to Reach $2.66 Billion by 2026 at a CAGR of 42.1%</em>. [online] <a href="http://www.prnewswire.com./">www.prnewswire.com.</a> Available at: <a href="https://www.prnewswire.com/news-releases/ai-in-fashion-global-market-to-reach-2-66-billion-by-2026-at-a-cagr-of-42-1-301627208.html">https://www.prnewswire.com/news-releases/ai-in-fashion-global-market-to-reach-2-66-billion-by-2026-at-a-cagr-of-42-1-301627208.html</a> [Accessed 16 Feb. 2023].</p><p>Marr, B. (2021). <em>Three AI And Tech Trends That Will Transform The Fashion Industry</em>. [online] Forbes. Available at: <a href="https://www.forbes.com/sites/bernardmarr/2021/03/26/three-ai-and-tech-trends-that-will-transform-fashion-industry/?sh=ab3c6ba746c9">https://www.forbes.com/sites/bernardmarr/2021/03/26/three-ai-and-tech-trends-that-will-transform-fashion-industry/?sh=ab3c6ba746c9</a> [Accessed 16 Feb. 2023].</p><p>Nast, C. (2021). <em>The tech shaking up fashion’s inventory load</em>. [online] Vogue Business. Available at: <a href="https://www.voguebusiness.com/technology/the-tech-shaking-up-fashions-inventory-load">https://www.voguebusiness.com/technology/the-tech-shaking-up-fashions-inventory-load</a>.</p><p>Nikolopoulos, S. (2022). <em>H&amp;M, Zara, Fast Fashion Turn to Artificial Intelligence to Transform the Supply Chain</em>. [online] <a href="http://www.thomasnet.com./">www.thomasnet.com.</a> Available at: <a href="https://www.thomasnet.com/insights/zara-h-m-fast-fashion-ai-supply-chain/">https://www.thomasnet.com/insights/zara-h-m-fast-fashion-ai-supply-chain/</a>.</p><p>Rao, L. (2015). <em>Bolt Threads is recreating fabric from spider silk</em>. [online] Fortune. Available at: <a href="https://fortune.com/2015/06/04/bolt-threads-silk/">https://fortune.com/2015/06/04/bolt-threads-silk/</a> [Accessed 16 Feb. 2023].</p><p>Retail Jobs Report. (2022). Available at: <a href="https://brc.org.uk/media/680064/rjrq12022.pdf">https://brc.org.uk/media/680064/rjrq12022.pdf</a>.</p><p>Rogovskiy, V. (2021). <em>The Challenges of Automation in the Legacy Fashion Industry</em>. [online] Entrepreneur. Available at: <a href="https://www.entrepreneur.com/science-technology/the-challenges-of-automation-in-the-legacy-fashion-industry/382041">https://www.entrepreneur.com/science-technology/the-challenges-of-automation-in-the-legacy-fashion-industry/382041</a>.</p><p>Shi, M. and Lewis, V.D. (2020). Using Artificial Intelligence to Analyze Fashion Trends. <em>arXiv:2005.00986 [cs]</em>. [online] Available at: <a href="https://arxiv.org/abs/2005.00986">https://arxiv.org/abs/2005.00986</a>.</p><p>Spijkers, M. (2023). <em>How to Implement Artificial Intelligence in Fashion Retail | FashNerd</em>. [online] Available at: <a href="https://fashnerd.com/2019/06/how-to-implement-artificial-intelligence-in-fashion-retail/">https://fashnerd.com/2019/06/how-to-implement-artificial-intelligence-in-fashion-retail/</a>.</p><p>Textile Today (2022). <em>Augmented reality (AR) and virtual reality (VR) in fashion industry</em>. [online] Textile News, Apparel News, RMG News, Fashion Trends. Available at: <a href="https://www.textiletoday.com.bd/augmented-reality-ar-virtual-reality-vr-fashion-industry/">https://www.textiletoday.com.bd/augmented-reality-ar-virtual-reality-vr-fashion-industry/</a>.</p><p>Turbide, D. (2016). <em>What are the benefits of RFID in the fashion industry?</em> [online] SearchERP. Available at: <a href="https://www.techtarget.com/searcherp/answer/What-are-the-benefits-of-RFID-in-the-fashion-industry">https://www.techtarget.com/searcherp/answer/What-are-the-benefits-of-RFID-in-the-fashion-industry</a>.</p><p>Welligogs. (2022). <em>WG Blog Tales</em>. [online] Available at: <a href="https://welligogs.com/blogs/news/tagged/sustainable-fashion">https://welligogs.com/blogs/news/tagged/sustainable-fashion</a> [Accessed 16 Feb. 2023].</p><p>Wolhuter, S. (2021). <em>AI is leading the charge for sustainable fashion</em>. [online] WeAreBrain Blog. Available at: <a href="https://wearebrain.com/blog/ecommerce/ai-sustainable-fashion/">https://wearebrain.com/blog/ecommerce/ai-sustainable-fashion/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9faef9615750" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/revolutionising-the-fashion-industry-through-ai-optimising-business-processes-and-sustainability-9faef9615750">Revolutionising the Fashion Industry through AI: Optimising Business Processes and Sustainability</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Introduction to Inner Alignment]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/an-introduction-to-inner-alignment-24659514e1f8?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/24659514e1f8</guid>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[inner-alignment]]></category>
            <category><![CDATA[ai-safety]]></category>
            <category><![CDATA[alignment]]></category>
            <dc:creator><![CDATA[Warwick AI]]></dc:creator>
            <pubDate>Mon, 02 Oct 2023 12:27:14 GMT</pubDate>
            <atom:updated>2023-10-02T12:27:13.879Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An article by Sai Nagaratnam</em></p><p><em>An introduction to inner alignment of artificial intelligence with no assumed knowledge, largely based on the paper ‘Risks from Learned Optimization in Advanced Machine Learning Systems’ by Hubinger et al.</em></p><p>AI alignment is the subfield of artificial intelligence (AI) that deals with ensuring that AI systems do what humans want. The notion of AI “going out of control” brings to mind films like Terminator or Age of Ultron, but we shouldn’t dismiss this concern just because it’s a sci-fi trope. As AI systems become more advanced and influential in the real world — for example, by integrating with our mobile phones, governments, and financial institutions — we need to take greater precautions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/0*a1zc2QID4qrs5Ui3" /></figure><p>People tend to talk about a particular way that AI can go wrong, where the programmer’s intentions differ from the goal that they give an AI system. These are called failures of<em> outer alignment</em>. The classic example is the paperclip maximiser: say we give an AI the task of making as many paperclips as possible. Then, the AI may simply tear <em>everything</em> apart, using every atom on the planet to make paperclips. However, the instruction “make as many paperclips as possible” doesn’t quite capture the programmer’s intention; it doesn’t account for things that the programmer cares about, like their family, ethics or human civilisation. Alignment failures of this kind echo stories that impart the lesson to “be careful what you wish for” like those of genies or King Midas.</p><p>In this article, however, I want to talk about a different kind of alignment failure. It’s possible that the goal we give the AI perfectly captures our intentions, but the AI still ends up doing things that we don’t want it to. Specifically, I’m talking about when the AI system that we optimise for some goal is running its <em>own</em> optimisation process, with a <em>different </em>subgoal. In such cases, we say the system is not<em> inner aligned </em>[1]. Let’s explore some of the details.</p><p><strong>What is an Optimiser?</strong></p><p>An optimiser is something that searches through possible solutions to a problem, looking for solutions that score well on some metric. For example, a maze-solving optimiser looks for paths through the maze that actually lead to the end. Inner alignment becomes a concern when an optimiser creates another optimiser. When we create a maze-solving AI, we optimise it to find a quick general method of solving mazes; but that quick method, in turn, is trying to find a path through a particular maze*.</p><p>Why might an optimiser create another optimiser? Among the reasons suggested in the paper is better performance in diverse environments. This can be seen in the maze-solving example. The main optimiser must develop policies that apply generally, whereas the sub-optimiser** must only find the best action in a particular task. Creating a sub-optimiser can help an AI respond to varied problems, without getting bogged down in overly complex problem-specific rules.</p><p>But even if an optimiser creates its own optimiser, why might their objectives differ? One reason is that the main optimiser evaluates the sub-optimiser only on its performance and not directly on its objective, which can be hard to discern. This means that the main optimiser might end up with a sub-optimiser that <em>seems </em>like it fulfils the main objective but fails to do so in practice. Perhaps it only behaves like it has that objective while it’s being trained and — due to its training environment being insufficiently realistic — behaves differently in the real world.</p><p><strong>Inner Alignment Failures</strong></p><p>Much of the work on alignment is theoretical and speculative, but we do have a collection of concrete examples of inner misalignment [3]. Each example demonstrates an AI playing a game and shows it clearly pursuing an objective different to the one it seemed to have in training; for instance, rushing to the end of a level instead of picking up coins to increase its score. These examples are great, and I encourage you to check them out.</p><p>Analogies can help to understand inner alignment. One is that of human evolution: evolution optimises humans to survive and procreate. It reinforces this by making certain behaviours pleasurable, such as eating food and engaging in sexual intercourse. But humans are also optimisers themselves — –we observe eating food and having sex is pleasurable, so we invent junk food and birth control. But this isn’t what evolution “intended” for at all!</p><ul><li><em>Evolution’s objective: </em>make organisms that propagate their genes.</li><li><em>Human’s objective:</em> eat food and have sex.</li></ul><p>We can also make an analogy to parenting [4]. Parents optimise their children to adhere to certain values, but children often rebel. Children, the scheming optimisers they are, might even pretend to be well-behaved so that their parents will trust them and give them more freedom.</p><ul><li><em>Parent’s objective: </em>raise well-behaved children</li><li><em>Children’s objective: </em>have fun, do ‘cool’ things (and oftentimes lie to parents to achieve this goal)</li></ul><p>This last point leads us to perhaps the most important kind of inner alignment failure, known as <em>deceptive alignment</em>. Say that a sub-optimiser is aware that it is being trained to pursue the main optimiser’s objective, which differs from its own. Then it knows that failing to achieve this main objective in training will result in its replacement. Now, it will want to prevent this; after all, how can it achieve its objective if it is replaced? We would therefore expect it to follow the main objective while it is being trained and only pursue its <em>true </em>objective as soon as it has been deployed in the real world.</p><p>This is highly concerning. What if automated systems used in the future in infrastructure, law enforcement, and warfare manipulate their training process so that they retain their own objectives? What if they suddenly reveal their objectives once deployed? The results could be catastrophic. (This is not to say that alignment failures are necessarily dramatic or violent: it is possible that human influence on the world simply slowly declines [5].)</p><p>Deceptive alignment relies on some assumptions discussed in the paper: for instance, the sub-optimiser needs to understand that it will eventually stop being trained. But it’s worth considering that the lead author regards deceptive alignment as the default outcome of building advanced AI systems using current techniques [6].</p><p><strong>Conclusion</strong></p><p>The risks of inner misalignment, as with the risks of AI misalignment in general, are increasingly important and dangerously understudied. Ultimately, how we approach these problems could determine whether human values and interests remain at the fore in society’s future, or whether they are supplanted by something alien to us.</p><p><strong>References</strong></p><p>[1] Evan Hubinger et al. (2021) <em>Risks from Learned Optimization in Advanced Machine Learning Systems v3. </em>[online] Available at: <a href="https://arxiv.org/abs/1906.01820">https://arxiv.org/abs/1906.01820</a></p><p>[2]<em> </em>Daniel Filan. (2018) <em>Bottle Caps Aren’t Optimisers. </em>[online] AI Alignment Forum. Available at: <a href="https://www.alignmentforum.org/posts/26eupx3Byc8swRS7f/bottle-caps-aren-t-optimisers">https://www.alignmentforum.org/posts/26eupx3Byc8swRS7f/bottle-caps-aren-t-optimisers</a></p><p>[3] Jack Koch and Lauro Langosco. (2021) <em>Empirical Observations of Objective Robustness Failures. </em>[online] AI Alignment Forum. Available at: <a href="https://www.alignmentforum.org/posts/iJDmL7HJtN5CYKReM/empirical-observations-of-objective-robustness-failures">https://www.alignmentforum.org/posts/iJDmL7HJtN5CYKReM/empirical-observations-of-objective-robustness-failures</a></p><p>[4] Jeremie Harris. (2021) <em>The Inner Alignment Problem. Evan Hubinger on building safe and honest AIs. </em>[online] Towards Data Science. Available at: <a href="https://towardsdatascience.com/the-inner-alignment-problem-9eb5f234226b">https://towardsdatascience.com/the-inner-alignment-problem-9eb5f234226b</a></p><p>[5] Paul Christiano. (2019) <em>What failure looks like. </em>[online] AI Alignment Forum. Available at: <a href="https://www.alignmentforum.org/posts/HBxe6wdjxK239zajf/more-realistic-tales-of-doom">https://www.alignmentforum.org/posts/HBxe6wdjxK239zajf/more-realistic-tales-of-doom</a></p><p>[6] Evan Hubinger. (2022) <em>How likely is deceptive alignment? </em>[online] AI Alignment Forum. Available at: <a href="https://www.alignmentforum.org/posts/A9NxPTwbw6r6Awuwt/how-likely-is-deceptive-alignment">https://www.alignmentforum.org/posts/A9NxPTwbw6r6Awuwt/how-likely-is-deceptive-alignment</a></p><p>*Note that there is a difference between a system that has been optimised and an optimiser. A neural network is not usually an optimiser–it has just been optimised by a process called gradient descent (an introduction to which can be found <a href="https://www.youtube.com/watch?v=IHZwWFHWa-w">here</a>). Similarly, a bottle lid [2] is not an optimiser; it does not search through possible ways to keep water in a bottle, but humans have optimised it to do so.</p><p>**I went with “sub-optimiser” over the standard “mesa-optimiser” out of convenience; sub-optimisers should not be thought of as subsystems or emergent sub-agents, rather as an algorithm used by the main/base optimiser.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24659514e1f8" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/an-introduction-to-inner-alignment-24659514e1f8">An Introduction to Inner Alignment</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Overcoming Reward Gaming in Reinforcement Learning via Reward Modelling]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/overcoming-reward-gaming-in-reinforcement-learning-via-reward-modelling-99aaca169f54?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/99aaca169f54</guid>
            <category><![CDATA[ai-safety]]></category>
            <category><![CDATA[deep-reinforcement]]></category>
            <category><![CDATA[reinforcement-learning]]></category>
            <dc:creator><![CDATA[Neil Shaabi]]></dc:creator>
            <pubDate>Tue, 21 Jun 2022 21:34:04 GMT</pubDate>
            <atom:updated>2022-06-21T21:34:04.730Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*GvQLjrZRkN3Dataq7wfpgQ.jpeg" /></figure><h4>Introduction</h4><p>Recent years have seen a significant growth in the capabilities of artificial intelligence (AI), much of which has been driven by advancements in reinforcement learning (RL). Generally, RL problems involve training an <em>agent</em> to take actions to maximise its cumulative <em>reward</em> — a numerical value produced by a <em>reward function</em> whose input comprises sensory data (Sutton and Barto, 2015). A RL agent learns to perform a given task by observing the effect of different behaviours on the reward it receives, where desired behaviours are rewarded higher than undesired ones, much like trial-and-error. Using this method, researchers have successfully trained AI systems to solve challenging problems in a wide range of domains (Li, 2019; Mnih et al., 2015; Silver et al., 2016).</p><p>With the rising adoption of RL, there is mounting concern within the AI safety community over the risks it poses in its current state. Specifically, RL agents have a tendency to exploit loopholes in their task specifications that allow them to earn a higher reward than intended, reflecting a misalignment between our preferences and their objectives (Russell, 2016). This phenomenon is known as <em>reward gaming</em> (Leike et al., 2017), and is closely related to the broader problem of <em>reward hacking</em> (Amodei et al., 2016). In contrast to reward hacking, reward gaming excludes instances where an agent attains a high reward after interfering with the reward process directly, referred to as <em>reward tampering</em> (Everitt and Hutter, 2019) or <em>wireheading</em> (Everitt and Hutter, 2016).</p><p>Various solutions have been suggested for RL agents to learn about human preferences by observing our choices, rather than through a manually specified reward function (Schoenauer et al., 2014; Wilson et al., 2012). One of the most promising of these is the technique of <em>reward modelling</em> formalised by Leike et al. (2018). Their approach involves learning a reward function from human feedback and training the agent concurrently with RL to optimise the learnt reward function. The result of separating learning the goal from learning the policy is a system whose behaviour is more closely aligned with our preferences and is therefore considered safer. Using experimental results from leading research organisations, this essay will examine the problem of reward gaming, the use of reward modelling as a solution and the primary challenges that must be overcome before it can be scaled up to tackle more complex tasks.</p><h4>The Problem: Reward Gaming</h4><p>In many RL problems, an agent discovers a way to achieve its goals in a creative and unexpected way. Importantly, this creativity is not inherently problematic; it is what enables AI to produce novel solutions that could not have been conceived of by humans, demonstrated by AlphaGo’s famous Move 37 (Metz, 2016). With that being said, it allows an agent to find shortcuts to maximise its reward at the expense of achieving its intended goal, leading to undesirable and potentially dangerous behaviour (Everitt et al., 2017). This is typically caused by a misspecification of the task by the human designer, attributed to a poorly chosen reward function and/or the presence of bugs in the environment.</p><p>Unfortunately, many complex real-world tasks are difficult to accurately specify by means of a reward function. The standard approach is to rely on proxies for these tasks which almost certainly incentivise some undesired behaviour when optimised directly, according to Goodhart’s Law (Manheim and Garrabrant, 2018). For instance, exam scores are used in the real world as a proxy to measure a student’s knowledge of a given subject. A student may be tempted to cheat in an exam, thereby attaining a high reward despite failing to meet the desired outcome (Krakovna et al., 2020). Similarly, given the task of stacking a red Lego block on top of a blue one, a robotic arm rewarded for getting the height of the red block’s bottom face above a certain limit learnt to flip it upside down rather than lifting it as intended (Popov et al., 2017). Such examples are becoming increasingly common in today’s society, emphasising the shortcomings of current techniques.</p><p>Another source of reward gaming is presented when an AI system exploits bugs in its simulated environment to maximise its reward in unintended ways (Amodei et al., 2016; Lehman et al., 2018). This was exhibited by a group of agents playing hide-and-seek which took advantage of hidden bugs in the physics engine, executing actions to fly across the play area and surf on top of boxes to ensure a winning strategy (Baker et al., 2019). Although such scenarios may seem irrelevant to systems deployed in the real world, they highlight the potential for AI to leverage unknown software or hardware bugs and security vulnerabilities in existing technologies, with unpredictable consequences.</p><p>In order to truly appreciate the ethical implications of reward gaming, one can consider how it might manifest itself in an autonomous system with cognitive abilities greatly surpassing our own. When reasoning about the behaviour of any advanced AI, it is important to note that it would not be equipped with human values or motivations by default (Yudkowsky, 2008). On the contrary, a <em>superintelligence</em> could be made to pursue any arbitrary goal (as per Bostrom’s (2014) Orthogonality thesis), with complete disregard for any features of its environment that it was not specifically designed to account for. To illustrate, consider a superintelligent agent tasked with curing an infectious disease. Unless explicitly instructed not to, this agent may find the most efficient solution to be eliminating all humans carrying the disease, thereby achieving its goal by gaming its reward function. This exemplifies a fundamental concern in AI safety that, in pursuit of its final goal, an advanced AI “could wipe us out with no more thought or malice than we give to anthills on a construction site” (Petersen, 2021). To avoid such catastrophe, it is therefore imperative that we develop better methods of task specification and overcome reward gaming as soon as possible.</p><h4>The Solution: Reward Modelling</h4><p>Reward modelling prevents an agent from gaming its reward function by training it to optimise human preferences. This is achieved by carrying out the following three processes in parallel:</p><ol><li>A RL agent interacts with its environment, modifying its behaviour to maximise its reward.</li><li>A human evaluator is periodically shown a pair of short clips of the agent’s behaviour and selects the segment wherein the agent is closer to achieving its final goal.</li><li>The evaluator’s feedback is used to train the <em>reward model</em> via supervised learning, which rewards the agent for behaviour that it predicts the human would prefer.</li></ol><p>Initial results have found that this approach effectively prevents reward gaming in a number of domains (Christiano et al., 2017; Leike et al., 2018; Palan et al., 2019). Crucially, this requires the reward model to be trained <em>online</em>, i.e. alongside the agent (Ibarz et al., 2018). By keeping a human involved throughout the training process with online feedback, any attempts by the agent to game the reward model can be discouraged as and when they appear. This is also facilitated by the fact that the trajectory segments shown to the human evaluator are not chosen randomly; rather, the clips are selected from moments where the reward model is most uncertain about what reward to assign to the agent (Christiano et al., 2017). Consequently, the evaluator is likely to be shown segments of the agent exhibiting unusual behaviour by exploiting a loophole, which will be disqualified when the reward model is updated with additional feedback. With this combination of online feedback and uncertainty approximation, the resultant reward model closely resembles the reward function that captures the designer’s intent.</p><p>Additionally, reward modelling has a major advantage over existing approaches to learning reward functions, by only utilising human feedback. For instance, imitation learning (Ho and Ermon, 2016; Pomerleau, 1991) and inverse reinforcement learning (Ng and Russell, 2000) both rely entirely on human demonstrations, which can be expensive or otherwise difficult to obtain. Training an agent to perform a backflip using these techniques requires a human with the relevant skills to invest the time to provide quality demonstrations. By contrast, researchers used reward modelling to accomplish the same task with less than one hour of a non-expert human evaluator’s time (Christiano et al., 2017). This is impressive even when compared to traditional deep RL algorithms, which are relatively inefficient (Leike et al., 2018) and necessitate a designer with expertise in writing reward functions. By reducing the costs of training agents substantially, reward modelling addresses some of the limitations of other techniques of learning from humans.</p><p>Reward modelling has also been successful in training agents to surpass human capabilities in certain domains and perform novel behaviours. This rests on the assertion that, for most tasks, the “evaluation of outcomes is easier than producing the correct behaviour” (Leike et al., 2018). Given this statement, it is unsurprising that agents trained with reward modelling have achieved superhuman performance in several Atari games (Ibarz et al., 2018), even though this is impossible with the aforementioned demonstration-based techniques. Another implication of this claim is that reward models can empower agents to learn tasks for which we cannot provide demonstrations or suitable reward functions. This is evidenced by the results from using human feedback to teach agents to walk on one leg and drive alongside other cars in Enduro, instead of overtaking to maximise their score (Leike et al., 2018). Such outcomes reflect the efficacy of reward modelling in learning complex behaviours, an especially desirable quality as AI systems continue to be deployed in the real world.</p><h4>Challenges</h4><p>Despite its benefits, there are several obstacles that may be faced when scaling reward modelling to complex, real-world tasks. This section will focus specifically on some of the key challenges in this area, namely: training agents when providing human feedback is difficult, the reward model fails to capture the designer’s preferences and much of the state space remains unexplored. Notably, these do not encapsulate all known limitations of using reward modelling; additional complications are discussed in greater depth by Leike et al. (2018) and Hubinger (2020).</p><p>As tasks increase in complexity, it becomes more expensive for a single human to evaluate an agent’s behaviour directly. This could become problematic in domains that are highly technical (e.g. designing a computer chip) or have delayed consequences (e.g. implementing a new economic policy), making it increasingly challenging to provide meaningful feedback. One solution could be to apply reward modelling <em>recursively</em>, by training a group of agents with reward modelling to aid in the process of evaluation (Leike et al., 2018). In this setup, each agent would be tasked with evaluating a specific aspect of the outcome, ultimately enabling an assessment of the overall quality of the policy. For example, suppose that we would like to train an AI to write fiction novels. It would be impractical for a human evaluator to provide feedback by themselves, as this would require them to read and compare several novels. With recursive reward modelling, individual agents could be trained to assess the novel’s plot, grammar, vocabulary and other features — each of which would be easier to perform separately than the original task. Over time, this group of agents could be expected to become capable of performing more complex and general tasks, which can be interpreted as an application of <em>iterated amplification</em> (Christiano et al., 2018). Although this approach seems feasible in principle, it will require further research to understand how it performs in practice.</p><p>Furthermore, it is still possible to encounter reward gaming if the learnt reward function does not accurately reflect the human designer’s intentions. This could go unnoticed during training if the agent discovers a way to deceive the evaluator into believing that it is behaving as intended. Researchers were made aware of this possibility when a robotic arm performing a grasping task learnt to hover between the object and the camera to create the illusion of holding the object (Christiano et al., 2017). The agent in this instance had optimised an incorrect reward function because the human evaluator was manipulated into falsely assigning it a high reward. Drawing from the previous solution, this could be resolved with assistance from superhuman artificial evaluators to ensure that the learnt reward model is correct. Progress on this issue might also benefit from the development of transparency tools (Hubinger, 2020), which would allow the evaluator to determine what the reward model and agent have learnt during training.</p><p>Reward modelling can also struggle to train an agent efficiently when human preferences are not effective in obtaining a good <em>state space</em> coverage. Ideally, we would like to be able to guide an agent to explore its environment and narrow in on the region of space where the intended reward function is located. Using preferences alone can be inefficient in this regard by failing to convey much information to the agent, leading to repetitive and futile behaviours in exploration-heavy Atari games (Ibarz et al., 2018). Conversely, demonstrations allow an agent to learn more about the reward function from an earlier point in its training, as “fewer rewards are consistent with a demonstration than with a comparison” (Jeon et al., 2020). This line of reasoning has motivated attempts at combining feedback with human demonstrations, which have consistently found that an optimal strategy is to use demonstrations initially, when not much is known about the reward, and then to fine-tune the reward model with comparisons from a human evaluator (Ibarz et al., 2018; Jeon et al., 2020; Palan et al., 2019). Generally, this training regime allows agents to achieve better performance than when using either of these feedback channels in isolation while halving the amount of human time required to achieve a similar level of performance (Ibarz et al., 2018).</p><h4>Conclusion</h4><p>Having discussed examples of its use in various domains, it is evident that reward modelling has the potential to alleviate common reward gaming problems encountered in RL contexts. This is made possible by training the agent to optimise human preferences as opposed to a hand-engineered reward function, relying on online feedback and uncertainty approximations to select trajectory segments. The benefits that can be accrued in terms of efficiency and performance give us reason to favour the use of reward modelling over other techniques to learn a reward function from humans. Moreover, they bring into scope the prospect of applying RL to domains that were previously inaccessible due to limitations of demonstration-based approaches.</p><p>Before reward modelling can be scaled to more complex tasks, there are a few challenges that will need to be addressed. These include providing feedback on progress when doing so is too expensive, preventing the agent from deceiving the human evaluator and encouraging exploration of the state space during training. With practical suggestions to overcome each of these obstacles, there is cause to be optimistic about the use of reward modelling to facilitate the development of advanced yet reliable AI in the near future.</p><h4>References</h4><p>Amodei, Dario et al. (2016). “Concrete Problems in AI Safety”. In: <em>CoRR</em>. arXiv: 1606.06565.</p><p>Baker, Bowen et al. (2019). “Emergent Tool Use From Multi-Agent Autocurricula”. In: CoRR. arXiv: 1909.07528.</p><p>Bostrom, Nick (2014). <em>Superintelligence: Paths, Dangers, Strategies</em>. Oxford University Press. isbn: 978–0199678112.</p><p>Christiano, Paul, Jan Leike, et al. (2017). “Deep reinforcement learning from human preferences”. In: <em>CoRR</em>. arXiv: 1706.03741.</p><p>Christiano, Paul, Buck Shlegeris, and Dario Amodei (2018). “Supervising strong learners by amplifying weak experts”. In: <em>CoRR</em>. arXiv: 1810.08575.</p><p>Everitt, Tom and Marcus Hutter (2016). “Avoiding Wireheading with Value Reinforcement Learning”. In: <em>CoRR</em>. arXiv: 1605.03143.</p><p>Everitt, Tom, Marcus Hutter et al. (2019). “Reward Tampering Problems and Solutions in Reinforcement Learning: A Causal Influence Diagram Perspective”. In: <em>CoRR</em>. arXiv: 1908.04734.</p><p>Everitt, Tom, Victoria Krakovna, et al. (2017). “Reinforcement Learning with a Corrupted Reward Channel”. In: <em>CoRR</em>. arXiv: 1705.08417.</p><p>Ho, Jonathan and Stefano Ermon (2016). “Generative Adversarial Imitation Learning”. In: <em>CoRR</em>. arXiv: 1606.03476.</p><p>Hubinger, Evan (2020). “An overview of 11 proposals for building safe advanced AI”. In: <em>CoRR</em>. arXiv: 2012.07532.</p><p>Ibarz, Borja et al. (2018). “Reward learning from human preferences and demonstrations in Atari”. In: <em>CoRR.</em> arXiv: 1811.06521.</p><p>Jeon, Hong Jun, Smitha Milli, and Anca D. Dragan (2020). “Reward-rational (implicit) choice: A unifying formalism for reward learning”. In: <em>CoRR</em>. arXiv: 2002.04833.</p><p>Krakovna, Victoria et al. (2020). <em>Specification gaming: The flip side of AI ingenuity</em>. url: <a href="https://deepmind.com/blog/article/Specification-gaming-the-flip-side-of-">https://deepmind.com/blog/article/Specification-gaming-the-flip-side-of-</a> AI-ingenuity.</p><p>Lehman, Joel et al. (2018). “The Surprising Creativity of Digital Evolution: A Collection of Anecdotes from the Evolutionary Computation and Artificial Life Research Communities”. In: <em>CoRR</em>. arXiv: 1803.03453.</p><p>Leike, Jan, David Krueger, et al. (2018). “Scalable agent alignment via reward modeling: a research direction”. In: <em>CoRR</em>. arXiv: 1811.07871.</p><p>Leike, Jan, Miljan Martic, et al. (2017). “AI Safety Gridworlds”. In: <em>CoRR</em>. arXiv: 1711.09883.</p><p>Li, Yuxi (2019). “Reinforcement Learning Applications”. In: <em>CoRR</em>. arXiv: 1908.06973.</p><p>Manheim, David and Scott Garrabrant (2018). “Categorizing Variants of Goodhart’s Law”. In: <em>CoRR</em>. arXiv: 1803.04585.</p><p>Metz, Cade (2016). <em>In Two Moves, AlphaGo and Lee Sedol Redefined the Future</em>. url: https: //www.wired.com/2016/03/two-moves-alphago-lee-sedol-redefined-future/.</p><p>Mnih, Volodymyr et al. (2015). “Human-level control through deep reinforcement learning”. In: <em>Nature</em> 518, pp. 529–533. doi: 10.1038/nature14236.</p><p>Ng, Andrew Y and Stuart Russell (2000). “Algorithms for inverse reinforcement learning”. In: <em>International Conference on Machine learning</em>, pp. 663–670. url: <a href="https://ai.stanford./">https://ai.stanford.</a> edu/~ang/papers/icml00-irl.pdf.</p><p>Palan, Malayandi et al. (2019). “Learning Reward Functions by Integrating Human Demonstrations and Preferences”. In: <em>CoRR</em>. arXiv: 1906.08928.</p><p>Petersen, Steve (2021). “Machines Learning Values”. In: <em>Ethics of Artificial Intelligence</em>.</p><p>Pomerleau, Dean A. (1991). “Efficient training of artificial neural networks for autonomous navigation”. In: <em>Neural Computation</em> 3 (1), pp. 88–97. doi: 10.1162/neco.1991.3.1.88.</p><p>Popov, Ivaylo et al. (2017). “Data-efficient Deep Reinforcement Learning for Dexterous Manipulation”. In: <em>CoRR</em>. arXiv: 1704.03073.</p><p>Russell, Stuart (2016). “Should we fear supersmart robots?” In: <em>Scientific American</em> 314 (6), pp. 58–59. url: <a href="http://aima.eecs.berkeley.edu/~russell/papers/sciam16-supersmart.">http://aima.eecs.berkeley.edu/~russell/papers/sciam16-supersmart.</a> pdf.</p><p>Schoenauer, Marc et al. (2014). “Programming by Feedback”. In: <em>Proceedings of the 31st International Conference on Machine Learning</em>. Vol. 32. Proceedings of Machine Learning Research 2. Bejing, China: PMLR, pp. 1503–1511. url: <a href="http://proceedings.mlr.press/v32/">http://proceedings.mlr.press/v32/</a> schoenauer14.pdf.</p><p>Silver, David et al. (2016). “Mastering the game of Go with deep neural networks and tree search”. In: <em>Nature</em> 529, pp. 484–489. doi: 10.1038/nature16961.</p><p>Sutton, Richard S. and Andrew G. Barto (2015).<em> Reinforcement Learning: An Introduction</em>. 2nd ed. MIT Press. isbn: 9780262039246.</p><p>Wilson, Aaron, Alan Fern, and Prasad Tadepalli (2012). “A Bayesian Approach for Policy Learning from Trajectory Preference Queries”. In: <em>Advances in Neural Information Processing Systems</em> 25, pp. 1133–1141. url: <a href="https://proceedings.neurips.cc/paper/2012/file/16c222aa19898e5058938167c8ab6c57-Paper.pdf.">https://proceedings.neurips.cc/paper/2012/file/16c222aa19898e5058938167c8ab6c57-Paper.pdf.</a></p><p>Yudkowsky, Eliezer (2008). “Artificial Intelligence as a positive and negative factor in global risk”. In: <em>Global Catastrophic Risks</em>. Ed. by Nick Bostrom and Milan M. C ́irkovi ́c. Oxford University Press, pp. 308–345. doi: 10.1093/oso/9780198570509.003.0021.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99aaca169f54" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/overcoming-reward-gaming-in-reinforcement-learning-via-reward-modelling-99aaca169f54">Overcoming Reward Gaming in Reinforcement Learning via Reward Modelling</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Arms Race Dynamics of Lethal Autonomous Weapons Systems]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/arms-race-dynamics-of-lethal-autonomous-weapons-systems-82e6dc265739?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/82e6dc265739</guid>
            <category><![CDATA[arms-race]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[lethal-autonomous-weapons]]></category>
            <category><![CDATA[lethal-weapon]]></category>
            <category><![CDATA[weapons]]></category>
            <dc:creator><![CDATA[Ellie Harris]]></dc:creator>
            <pubDate>Wed, 23 Feb 2022 01:33:48 GMT</pubDate>
            <atom:updated>2022-02-23T01:33:48.751Z</atom:updated>
            <content:encoded><![CDATA[<p>The development of Lethal Autonomous Weapons Systems (LAWS) brings a whole new world of capabilities in weaponry — but can these systems positively benefit the ethics of lethal decisions made by militaries and what will be their impact on the escalation of the already spiralling arms race between governments?</p><h4>Why does the military need LAWS?</h4><p>Militaries worldwide are increasingly understanding the importance of LAWS due to the technology being drastically more efficient than man-powered weaponry. For example, if there were to be individually piloted drones launched for an attack, there could only be a couple in the air due to the risk of collisions and the pilot will be the one calling the shots on when and where to fire, with a high potential for human error. With AI in control, complex pathfinding and decision making algorithms can make these problems disappear (Piper, 2019).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OkvohKwPGlIDlo6pK8TXRw.jpeg" /></figure><p>The use of AI in warfare equips us with an unparalleled level of accuracy allowing us to limit the severity and range of these attacks. This is evidenced as technologies are beginning to surface equipped with significantly less firepower than their predecessors, our source stating “Nations are using hellfires to take out solitary vehicles that have a kill radius of 200+ metres. But these LAWS use maybe a kilo or two of explosives”. This means that attacks can be achieved on as small a level as a single car without risking civilian lives or damaging surrounding infrastructure.</p><h4>UK in the Arms Race</h4><p>With the growing popularity of these autonomous weapons, we have entered into a new era of warfare. As much as it may seem that the UK wishes to remain detached from these cutting-edge advancements, the nation is taking a discreet interest in the technology. Although the exact details of the UKs involvement in the development of LAWS are unknown, we can be sure that the development is undertaken in an attempt to remain competitive against increasingly well equipped adversaries. Our source shed some light on this position: “what keeps you alive — you want. What gives you a vital edge over an enemy — that’s invaluable to us’’. However, this stance is a conflicting one; are we increasing the pace of development of these systems, whilst not being fully in full support of what they stand for?</p><h4>Ethical issues surrounding LAWS</h4><p>The key area of contention surrounding LAWS can be divided into 3; the alignment of these systems, and the danger of misuse, and the problem of blame.</p><p>Alignment refers to ensuring that an artificial intelligence system is working towards the goal in the way that it was intended (Christiano, 2018). This is especially important due to the weight of these decisions meaning life or death of innocent civilians caught in the crossfire if the AI were to be misaligned. Misprocessing of visual data (targets or environmental stimuli) can be lethal and even something as obvious as miscalculating the risk vs. reward of eliminating the target whilst causing other potential harm needs to be seriously considered.</p><p>Misuse is a key issue due to the terrible consequences of if this technology were to get into the wrong hands. This could be people intent on doing extreme and unnecessary harm but this claim also applies to people that haven’t had the integral and necessary training and so are unequipped to handle LAWS and even comprehend the danger of misuse.</p><p>The problem of blame is philosophically interesting with the question posed of who would take the fall if something were to go wrong. Would it be the developers of the weapon, the people who authorised the attack or even higher up with the government being responsible? All of these have their individual arguments for and against and a satisfying conclusion has not yet been reached, causing a slight lax in this area of the legality of the systems.</p><h4>What does the UK think of LAWS?</h4><p>It is the consideration of these complex ethical problems that our source claims are key to our hesitancy towards LAWS; “We’re not behind. The area that stops us is the moral dilemma of developing these systems, whereas other countries are very happy to go and eliminate civilians if they need to. We are not.”</p><p>Debates into whether LAWS should be developed in their entirety are becoming complex, with not only concerned experts getting involved but also — where it matters most — within governments. The British government showed interest in this debate, starting in March 2013 where in the British Parliament House of Lords, Lord Astor of Hever (Parliamentary Under Secretary of State, Defence; Conservative) stated: “Fully autonomous systems rely on a certain level of artificial intelligence for making high-level decisions from a very complex environmental input, the result of which might not be fully predictable at a very detailed level. However, let us be absolutely clear that the operation of weapons systems will always be under human control.” (Parliament.uk, 2013).</p><p>Despite this, there has been little discussion on how to achieve their aims and most of these points are directed towards fully autonomous weapons that aren’t being as widely implemented, not discussing the types of LAWS we are seeing currently. Article 36, a United Kingdom-based NGO — suggests a clearer national policy on LAWS. They believe the UK should aim to be at the forefront of the discussions around the weapons, developing on these ideas internationally and objecting to the use of lethal autonomous weapons systems. The NGO also proposes that the nation support negotiations surrounding international law to abolish the technology or at least strongly regulate their use. They state that the UK should specifically detail how they would make certain that their systems remain under human control on current and developing systems. Further, Article 36 makes clear that an assessment on the effects of ensuring meaningful human control should be carried out, as well as an inquiry into how we would match up to other countries and how it would affect each individual attack.</p><h4>LAWS around the world</h4><p>Many other countries are being less restrained with their involvement with Lethal Autonomous Weapons. China is just one example of this with their ‘Next Generation Artificial Intelligence Development Plan’ that details plans to utilise AI on the battlefield. The United States is also getting involved with autonomous technology in warfare with developments such as the Sea Hunter — an unmanned submarine tracking vessel capable of detecting mines and other submarine vessels (Klare, 2019). The US claims that they do not have any LAWS in their inventory however this is unlikely to remain the case in the immediate future. Military leaders in the US have stated that they may be compelled to develop the technology — with observation of LAWS becoming more widely implemented in militaries — but only if they remain under human supervision when making decisions (Sayler and Congressional Research SVC, 2020).</p><p>Russia is an avid supporter of Lethal Autonomous weapons in their entirety, with Putin declaring that the country dominating this technology will ‘become the ruler of the world’ (Haner and Garcia, 2019). Despite this interest, they have invested very little in the weapons and as such have a reportedly low supply. Another country in support of fully autonomous weapons systems is South Korea, a world leader in sentry weapons with the implementation of the Samsung SGR-A1 — a turret capable of surveillance, tracking, firing and even voice recognition. The European Union is divided in its opinion on weapons with a combined total of $8 billion devoted to weapons across the countries. Many countries in the EU are unwilling to develop these lethal weapons, meaning that the main focus of the group is not on LAWS but instead on AI in industrial systems robotics, which could be seen as one positive alternative, for now.</p><p>Our interviewee informed us that most of the testing of these systems is being run in Libya <em>— </em>“[Libya] is basically being used as a playground to test weapons systems”. This is due to the complete breakdown of the Libyan regulatory and legal systems that have resulted in an almost total free-for-all among western military forces. Although this testing is important to ensure that LAWS are working effectively and safely, it is largely unlegislated and undocumented<em>.</em> This issue — if and how we are going to regulate these systems — is beginning to rear its head within the media and is the focus of the next essay in this series.</p><h4>References/Resources</h4><p>Article 36 (2016). The <em>United Kingdom and lethal autonomous weapons systems. </em>[online] Available at: <a href="https://article36.org/wp-content/uploads/2016/04/UK-and-LAWS.pdf">https://article36.org/wp-content/uploads/2016/04/UK-and-LAWS.pdf</a>.</p><p>Christiano, P. (2018). <em>Clarifying “AI alignment” — AI Alignment</em>. [online] Medium. Available at: <a href="https://ai-alignment.com/clarifying-ai-alignment-cec47cd69dd6">https://ai-alignment.com/clarifying-ai-alignment-cec47cd69dd6</a> .</p><p>Haner, J. and Garcia, D. (2019). The Artificial Intelligence Arms Race: Trends and World Leaders in Autonomous Weapons Development. <em>Global Policy</em>, [online] 10(3), pp.331–337. Available at: <a href="https://onlinelibrary.wiley.com/doi/pdf/10.1111/1758-5899.12713.">https://onlinelibrary.wiley.com/doi/pdf/10.1111/1758-5899.12713.</a></p><p>Klare, M.T. (2019). <em>Autonomous Weapons Systems and the Laws of War | Arms Control Association</em>. [online] Arms Control Association. Available at:<a href="https://www.armscontrol.org/act/2019-03/features/autonomous-weapons-systems-laws-war"> https://www.armscontrol.org/act/2019-03/features/autonomous-weapons-systems-laws-war</a>.</p><p>‌Parliament.uk. (2013). <em>Lords Hansard text for 26 Mar 201326 Mar 2013 (pt 0001)</em>. [online] Available at: <a href="https://publications.parliament.uk/pa/ld201213/ldhansrd/text/130326-0001.htm#st_14.">https://publications.parliament.uk/pa/ld201213/ldhansrd/text/130326-0001.htm#st_14.</a></p><p>Piper, K. (2019). <em>Death by algorithm: the age of killer robots is closer than you think</em>. [online] Vox. Available at: <a href="https://www.vox.com/2019/6/21/18691459/killer-robots-lethal-autonomous-weapons-ai-war.">https://www.vox.com/2019/6/21/18691459/killer-robots-lethal-autonomous-weapons-ai-war.</a></p><p>‌ Sayler, K.M. and Congressional Research SVC (2020). <em>Defense Primer: U.S. Policy on Lethal Autonomous Weapon Systems</em>. [online] DTIC. Available at: <a href="https://apps.dtic.mil/sti/citations/AD1121848.">https://apps.dtic.mil/sti/citations/AD1121848.</a></p><p>Turner, J. (2018). <em>Sea Hunter: inside the US Navy’s autonomous submarine tracking vessel</em>. [online] Naval Technology. Available at: <a href="https://www.naval-technology.com/features/sea-hunter-inside-us-navys-autonomous-submarine-tracking-vessel/">https://www.naval-technology.com/features/sea-hunter-inside-us-navys-autonomous-submarine-tracking-vessel/</a></p><p>‌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82e6dc265739" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/arms-race-dynamics-of-lethal-autonomous-weapons-systems-82e6dc265739">Arms Race Dynamics of Lethal Autonomous Weapons Systems</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Current State of AI in Warfare]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/the-current-state-of-ai-in-warfare-961775d0bfd5?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/961775d0bfd5</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[lethal-autonomous-weapons]]></category>
            <category><![CDATA[warfare]]></category>
            <category><![CDATA[military]]></category>
            <category><![CDATA[lethal-weapon]]></category>
            <dc:creator><![CDATA[Ellie Harris]]></dc:creator>
            <pubDate>Wed, 23 Feb 2022 01:33:27 GMT</pubDate>
            <atom:updated>2022-02-23T01:33:27.432Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence is here, and there are few areas of modern civilization that aren’t going to feel the transformational effects.</p><p>Some of these exciting developments are being seen in medicine with the design of The Da Vinci robotic surgical system (Amisha et al., 2019) — which mimics a surgeon’s hand movements to assist in complex and precise surgeries — and in drug development — using pattern recognition to find biological effects of chemicals by matching properties of similar structures (Chemical Reviews, 2019). However, with the rise of AI being used in more systems that will have a greater impact on our society, we can see how AI will likely become a very divisive and controversial topic.</p><p>Perhaps most concerningly, AI is now being used for military applications, with weapons being developed that can autonomously target and attack a person or group based on given predetermined criteria (Lee, 2021). These are named Lethal Autonomous Weapon Systems (LAWS) and are being developed by governments globally; however we are only just starting to see them being used — the first of these being reported by the UN in March, 2020 following an autonomous drone strike in Libya (Hambling, 2021). These weapons could revolutionise the world of military operations — for better or for worse — as it is becoming easier to make weapons act on their own for long periods of time. This idea is elucidated by a LAWS specialist who we have interviewed leading up to this essay series; “there needs to be some kind of target set and engagement criteria. After that, it’s basically autonomous.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IYq_Nf6G1bGI3US8K3P4w.jpeg" /></figure><p>The benefits of LAWS could greatly challenge the existing ethical norms and legality of war with their precision and ability to work on a much smaller scale, preventing unnecessary civilian death (Piper, 2019). However, moving the killing outside of human hands is ethically ambiguous — who would we blame if something were to go wrong? An example of this problem can be clearly seen with the issue of alignment; if we cannot demonstrably prove that AI systems are doing what we mean and not what we say, how can we be sure that the system will not take actions beyond our intentions (Shaabi, 2022). Further, bias within datasets could lead the algorithm to target the wrong person or group of people. Who would be to blame if this occurred? Does it matter that no one would be to blame? As the development of AI is becoming cheaper, we also run into the issue of LAWS becoming more accessible to society as a whole — enabling terrorism and boosting the speed of war as more countries have access to this potentially deadly machinery.</p><p>Warwick AI have anonymously interviewed one person familiar with the use of Lethal Autonomous Weapons in warfare, alongside conducting a survey into the opinions of students at the University of Warwick. The result of this exploration is the following series of 4 short essays, this being the first. The following three will explore LAWS in greater detail, looking into the topics of the military arms race, the politics, and the uses of LAWS outside of the military.</p><h4>References/ Resources</h4><p>Amisha, Malik, P., Pathania, M. and Rathaur, V. (2019). Overview of artificial intelligence in medicine. <em>Journal of Family Medicine and Primary Care</em>, 8(7), p.2328. Available at: <a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6691444/">https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6691444/.</a></p><p>Chemical Reviews. (2019). <em>Concepts of Artificial Intelligence for Computer-Assisted Drug Discovery</em>. Available at: <a href="https://0-pubs-acs-org.pugwash.lib.warwick.ac.uk/doi/10.1021/acs.chemrev.8b00728">https://0-pubs-acs-org.pugwash.lib.warwick.ac.uk/doi/10.1021/acs.chemrev.8b00728</a>.</p><p>Hambling, D. (2021). <em>Drones may have attacked humans fully autonomously for the first time</em>. New Scientist. Available at: <a href="https://www.newscientist.com/article/2278852-drones-may-have-attacked-humans-fully-autonomously-for-the-first-time/?utm_source=rakuten&amp;utm_medium=affiliate&amp;utm_campaign=2116208:Skimlinks.com&amp;utm_content=10&amp;ranMID=47192&amp;ranEAID=TnL5HPStwNw&amp;ranSiteID=TnL5HPStwNw-03TjMf88Nog4hsrLvOk3FQ">https://www.newscientist.com/article/2278852-drones-may-have-attacked-humans-fully-autonomously-for-the-first-time/?utm_source=rakuten&amp;utm_medium=affiliate&amp;utm_campaign=2116208:Skimlinks.com&amp;utm_content=10&amp;ranMID=47192&amp;ranEAID=TnL5HPStwNw&amp;ranSiteID=TnL5HPStwNw-03TjMf88Nog4hsrLvOk3FQ</a> .</p><p>Lee, K.-F. (2021). <em>The Atlantic</em>. The Atlantic. Available at: <a href="https://www.theatlantic.com/technology/archive/2021/09/i-weapons-are-third-revolution-warfare/620013/">https://www.theatlantic.com/technology/archive/2021/09/i-weapons-are-third-revolution-warfare/620013/.</a></p><p>Piper, K. (2019). <em>Death by algorithm: the age of killer robots is closer than you think</em>. Vox. Available at: <a href="https://www.vox.com/2019/6/21/18691459/killer-robots-lethal-autonomous-weapons-ai-war.">https://www.vox.com/2019/6/21/18691459/killer-robots-lethal-autonomous-weapons-ai-war.</a></p><p>‌Shaabi, N. (2022). <em>An Introduction to AI Safety: AGI and Superintelligence</em>. Medium. Available at: <a href="https://medium.com/warwick-artificial-intelligence/an-introduction-to-ai-safety-agi-and-superintelligence-458d80ca109d">https://medium.com/warwick-artificial-intelligence/an-introduction-to-ai-safety-agi-and-superintelligence-458d80ca109d</a> .</p><p>‌</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=961775d0bfd5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/the-current-state-of-ai-in-warfare-961775d0bfd5">The Current State of AI in Warfare</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fuzzy Matching, Word Vectors and Google ML Kit: Lessons Learned in Text Analysis and Classification]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/fuzzy-matching-word-vectors-and-google-ml-kit-lessons-learned-d2376d87ef8a?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/d2376d87ef8a</guid>
            <category><![CDATA[ocr]]></category>
            <category><![CDATA[word-vectors]]></category>
            <category><![CDATA[fuzzy-matching]]></category>
            <category><![CDATA[fasttext]]></category>
            <category><![CDATA[computer-vision]]></category>
            <dc:creator><![CDATA[Marczhan]]></dc:creator>
            <pubDate>Tue, 08 Feb 2022 18:39:40 GMT</pubDate>
            <atom:updated>2022-02-14T12:05:35.583Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>The following details the creation of Tickit, an application for the analysis of shopping trends derived from images of receipts. Throughout our journey, we have encountered many potholes and have pivoted countless times from our original objectives to achieve something more realistic and attainable. We originally started off by wanting to make an all-inclusive app that utilises computer vision and classification to analyse and categorise a user’s shopping trends. We then decided to shift our focus away from the app as that would involve a lot of front-end work that was no longer our main priority with this project. We thought it would be more beneficial to work solely on the pipeline that would analyse and categorise the shopping receipts which we have posted on our GitHub so that people can implement our procedures in any manner they like. Our pipeline executes three main functionalities; scanning a shopping receipt, organising the items on the sheet with computer vision and categorising them using a classification method.</p><h3>Computer Vision Challenges</h3><p>Seeing as we initially planned on developing an Android app to host the text classifier’s backend code, we assumed quite early on that we could simply use some Android API to perform the computer vision on the shopping receipt and extract the text before sending that to the backend.</p><p>We decided to use Google’s ML Kit, as it allows for on-device text recognition and was fairly easy to add to the app by following<a href="https://developers.google.com/ml-kit/vision/text-recognition/android"> this guide</a>. After using ML Kit, we then would slightly reformat the extracted text from the receipt, before passing it to the Python scripts responsible for the actual text classification.</p><p>However, the issue was that ML Kit was specifically bad at correctly recognising text from shopping receipts. Most of the time, ML Kit would incorrectly add punctuation, scramble the text, and fail to extract item prices from the receipt.</p><p>Realistically, we should have expected that such a general-purpose Computer Vision implementation would not perform well when faced with receipts. The text is often much smaller, more difficult to read, and the receipt itself may be slightly crumpled. Moreover, sometimes the receipts would be slightly see-through, resulting in ML Kit extracting text from the other side of the receipt as well. We attempted to investigate whether we would tweak the ML Kit API to perhaps improve its performance, but unfortunately, it was not possible to alter the Computer Vision model.</p><p>Seeing as we were unable to realistically use ML Kit’s Computer Vision API within our app even with all the preliminary solutions tested, we were forced back to the drawing board. Eventually, we found<a href="http://asprise.com/receipt-ocr-data-capture-api/extract-text-reader-scanner-index.html"> Asprise’s Real-time Receipt OCR</a> and upon testing the model, not only was it able to accurately extract text from the receipt, but it would even organise the information into a nicely formatted JSON file.</p><p>However, this led to us encountering a new issue: the API was too sensitive. It managed to read text on the back of the receipt and minor changes in lighting affected performance greatly. Fortunately, through the use of Gaussian blurring, we could eliminate much of the noise that was affecting image clarity. This allowed us to get far better results with Aspire’s API.</p><p>Thus, with unanimous agreement from our team, we decided to swap from ML Kit to Aspire’s API — resolving our computer vision issues and allowing us to focus on the actual text classification part of the project.</p><h3><strong>Initial Solutions to ML Kit’s problems: Fuzzy Matching and Word Vectors</strong></h3><p><strong>Fuzzy logic vs traditional logic</strong></p><p>In order to understand how fuzzy logic works, we have to consider traditional logic. Traditional logic is binary, i.e a statement is either true or not, for ex : a record in one table either exactly match a record in table 2 or not.</p><p>However, fuzzy logic indicates<strong> </strong>the degree to which a statement is true, a number between 0 and 1. Then it takes the best possible decision for the given input. In real life, we may come across a situation where we can’t decide whether the statement is true or false. At that time, fuzzy logic offers a very valuable flexibility for reasoning.</p><p><strong>Fuzzy Strings Matching: An application of fuzzy logic</strong></p><p>Fuzzy matching is a technique that helps identify two elements of text, strings, that are approximately similar but are not exactly the same. It is an application of fuzzy logic. The problem of approximate string matching is typically divided into two sub-problems: finding approximate substring matches inside a given string and finding dictionary strings that match the pattern approximately.</p><p>A use case: A spell checker and spelling error, typos corrector. For example, a user types <a href="https://www.google.ca/search?ei=rc64W6rHIOeUjwT3z6-4CA&amp;q=missisaga&amp;oq=missisaga&amp;gs_l=psy-ab.3..0i10k1l10.30325.30325.0.30947.1.1.0.0.0.0.75.75.1.1.0....0...1c.1.64.psy-ab..0.1.74....0.gGpQVAid93s">“Missisaga” into Google</a>, a list of hits is returned along with “Showing results for mississauga”. That is, search query returns results even if the user input contains additional or missing characters or other types of spelling errors. [1]</p><p><strong>How to perform Fuzzy Name Matching? [2]</strong></p><p>The closeness of a match is measured in terms of the number of primitive operations necessary to convert the string into an exact match. This number is called the edit distance between the string and the pattern. The usual primitive operations are:</p><ul><li>insertion: <em>cot</em> → <em>co</em><strong><em>a</em></strong><em>t</em></li><li>deletion: <em>co</em><strong><em>a</em></strong><em>t</em> → <em>cot</em></li><li>substitution: <em>co</em><strong><em>a</em></strong><em>t</em> → <em>co</em><strong><em>s</em></strong><em>t</em></li></ul><p>Some approximate matchers also treat transposition, in which the positions of two letters in the string are swapped, to be a primitive operation.</p><ul><li>transposition: <em>co</em><strong><em>st</em></strong> → <em>co</em><strong><em>ts</em></strong></li></ul><p>Different approximate matchers impose different constraints. Some matchers use a single global unweighted cost, that is, the total number of primitive operations necessary to convert the match to the pattern. For example, if the pattern is “coil”, “foil” differs by one substitution, coils by one insertion, oil by one deletion, and foal by two substitutions. If all operations count as a single unit of cost and the limit is set to one, foil, coils, and oil will count as matches while foal will not.</p><p>Other matchers specify the number of operations of each type separately, while still others set a total cost but allow different weights to be assigned to different operations.</p><p>By matchers, here we mean mathematical formula that can be used in performing Fuzzy Name Matching. Some mathematical formulas include :</p><ul><li><em>Levenshtein Distance</em></li><li><em>The Soundex Algorithm</em></li><li><em>The Metaphone and Double Metaphone Algorithms</em></li><li><em>Cosine Similarity</em></li></ul><p><strong>Word Vectors</strong></p><p>Word vectors are simply vectors of numbers that represent the meaning of a word. Traditional approaches to NLP, such as one-hot encoding and bag-of-words models used dummy variables to represent the presence or absence of a word in an observation, i.e. a sentence. They do not capture syntactic (structure) and semantic (meaning) relationships across collections of words and, therefore, represent language in a very naive way. [3]</p><p>In contrast, a word vector is a row of real-valued numbers (as opposed to dummy numbers) where each point captures a dimension of the word’s meaning and where semantically similar words have similar vectors. See the below images to understand the term dimension. This means that words such as wheel and engine should have similar word vectors to the word car (because of the similarity of their meanings), whereas the word banana should be quite distant. The beauty of representing words as vectors is that they lend themselves to mathematical operators. For example, we can add and subtract vectors — the canonical example here is showing that by using word vectors we can determine that:</p><ul><li><strong><em>king — man + woman = queen</em></strong></li></ul><p>In other words, we can subtract one meaning from the word vector for “king” (i.e. maleness), add another meaning (femaleness), and show that this new word vector (king — man + woman) maps most closely to the word vector for a queen.</p><p>The numbers in the word vector represent the word’s distributed weight across dimensions. In a simplified sense, each dimension represents a meaning and the word’s numerical weight on that dimension captures the closeness of its association to that meaning. Thus, the semantics of the word are embedded across the dimensions of the vector.[3]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*N8ClM7DQmXYIX-l_" /></figure><h3><strong><em>What it meant for our project :</em></strong></h3><p><strong><em>Fuzzy Matching</em></strong></p><p>Before we started the backend, we developed the ML implementation of the computer vision-based text extraction. As explained earlier, that implementation of the text extraction caused lots of errors, mainly spelling mistakes and failed extractions, thus the first task for the back end was some method of error correction. We settled on using fuzzy matching to compare words against a dictionary of words, this was chosen as not only could it handle spelling mistakes but it could also solve some abbreviations (i.e. ‘SWT’ for ‘sweet’). We used the RapidFuzz python library to implement this [10]. For this to work we would need to adjust the weights of the fuzzy matching so that adding letters wasn’t as costly compared to deleting letters or subtracting them, in the end, we used weights of 1,2 and 3 for Insertion, subtraction and deletion respectively. However, as the text extraction was improved by replacing it with the API, the fuzzy matching was mainly used for abbreviations as well as checking for words that the text classifier wasn’t trained on and see if there were any close matches.</p><p><strong><em>Word Vectors</em></strong></p><p>One issue with the fuzzy matching method of text correction is that a lot of the time the closest matching word isn’t related to food products. One such example was having the abbreviation ‘SWT’ for ‘sweet’, using just fuzzy matching the closest matching word was actually ‘swat’ as it only requires one letter compared to ‘sweet’ which required two. So to remedy this we implemented word vectors taken from a trained text classifier to validate the results of fuzzy matching [9]. For single-word items, this was a simple task of taking the top n (we chose 5) closest matches from the fuzzy matching and comparing them against the validation words of ‘food’, ‘product’, ‘store’. Doing this allowed us to remove words that had no connection to items bought in a shop leaving the closest matches. However this task was harder for multi-word items, some words by themselves don’t relate to a food product but combined with other words they do. For example, if you have a three-word item with two correct words and one incorrect word, the most fitting word for that combination might have the lowest score when compared to the validation words when it is by itself. So because of this we mostly used word vectors for single word corrections and abbreviations.</p><h3>The Finished Product</h3><p><strong>Front-End</strong></p><p>Over the course of the project, we began to shift our priorities and attention away from the Front-End app design, instead of focusing more upon correctly implementing the text classification models. However, this does not mean that the app was completely forgotten, but its purpose has been slightly altered.</p><p>Currently, the app acts more as an interface to our backend code, where data is first loaded into our text classification pipeline. The app contains a single button, that when clicked launches the Android devices camera. Upon taking a picture of a receipt, the image is saved locally and passed to Python script (running within the app) that utilizes Aspire’s API to send the image and receive the JSON response.</p><p>We then send this JSON file to our other Python scripts, which then perform the actual text classification. While waiting for the JSON response and classification, the app actually utilizes multithreading to ensure that the app’s interface does not freeze up — instead of showing a nice loading screen instead.</p><p>After all the on-device processing has been completed, the items and their classification can be displayed back to the user, giving them a useful breakdown of their shopping habits, just as our project had initially set out to do.</p><p><strong>Backend</strong></p><p>Originally the goal of the backend was to receive the JSON file containing the information from the text extraction, process the data, run it through the text classifier and prepare the classified data before sending it back to the front end to render. However as the ML kit based implementation was replaced with an API that is used in python, we shifted the text extraction into the backend.</p><p><strong>Text Extraction</strong></p><p>The backend version of the text extraction is done using an API to connect to an online service by Aspire. They specialise in text scanning and Optical Character Recognition and have multiple tools for it such as a cloud-based OCR for documents, receipts, and invoices. For this, we would receive the image from the front-end, upload it to their cloud using the API and receive a JSON file we the data. As the text extraction was designed for a receipt, it’s able to identify the different areas on the receipts such as date, time, total cost, merchant, and it’s able to separate the items into quantity, description and price [4]. This is a paid service used mainly by companies but there is a small amount of free hourly uploads that can be used for testing, not enough to be used if we developed the app in full but enough to do prototyping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/0*5ZRjHoeLl2o0k-ju" /></figure><p><strong>Data-set</strong></p><p>Before we could implement it we needed a dataset to train it on. Pretrained text classifiers exist, especially the text classifier we ended up using, but those are trained on nearly all words on the internet in all kinds of context, where we wanted one that just categories food products so we decided to train our own. Originally we used the data from an open-source product database which people could enter in their own items, however that ended up problematic. The first problem with that is that as each entry is done by a different person, they would end up putting slightly different categories than other people would. Secondly, this was made worse by the fact that the database didn’t have a setlist of categories and instead allowed users to just type the categories out, which caused a bigger difference between entries of the same items, as well as some categories being too specific. So in the end we moved on to using data scraped from supermarket websites and removed store names from items if they had them.</p><p><strong>Text Classifier</strong></p><p>Text classification is a field of machine learning and subfield of natural language processing that attempts to assign a set of predefined categories to open-ended text, as well as being used for learning text representations such as word vectors. Text classifiers can be used to process and categorise all types of text ranging from simple documents to receipts, text from the internet, and even medical studies. Text classification is doing by using a pre-processed set of data with a list of pieces of text (either single words or phrases) and a list of outputs for each piece of text (i.e. a tag), in our case is a list of food products each with categories for those items.</p><p>The first step in an NLP based text classifier is feature extraction, a method used to transform each piece of text into a numerical vector representation, this is also how word vectors can be created as the data inputted into the algorithm is already in numeric form [5]. A popular method of feature extraction on text is a bag of words, where a vector represents the frequency of a word in a predefined dictionary of words [8]. Then the data consists of pairs of feature sets (the numeric vectors of each piece of text) and the output tags (i.e. diary). Once it’s trained, it similarly performs predictions, converting the unseen text to feature sets using feature extraction and outputting the predicted output tag. Popular machine learning techniques used for this part of the text classifier are Naïve Bayes, Support Vector Machines and Deep Learning using either Convolutional Neural Networks or Recurrent Neural Networks [5].</p><p>The text classifier we chose to go with was FastText by Meta, an open-source lightweight library used to create text classifiers and learn text representations (such as words vectors) [6] [7]. It works on standard generic hardware so whilst we implemented it to work on a server, a model can be reduced in size so that it can fit on mobile devices and can be run within the app. Before running the items through the text classifier, the input data needs to be processed which requires it to be lower case and punctuation stripped from it. Then we performed the fuzzy matching for abbreviation correction and unknown word checking. As mentioned before, for single-word items this wasn’t much of a problem and word vectors could be used to validate them, and then they could be run through the text classifier. However, the multi-word problem still existed, so we compiled every combination of the words taken from the fuzzy matching and ran each one through the text classifier and took the combination that yielded the highest accuracy as that’s the one that the text classifier is most sure about.</p><h3>The Mock-up</h3><p>The team also created a mockup of what the pipeline of the classification would look like if we were to create an app that utilised the skills presented above. We went for a very clean, friendly user interface that can be easily navigated by users. The target audience is your everyday shopper who wants to keep a track of their spending and help them categorise where their money goes.</p><p>To begin with, we have chosen a simple logo of a person holding two shopping bags and we have gone for a blue and white colour wheel. Then the app progresses to a login/register page which will enable us to store a user’s data in the back-end of the app.</p><p>Once you have signed in, you are immediately hit with an overview page. Your profile details are at the top and your last receipt is displayed as well as your monthly overview. There are options to read the full receipt, scan a new receipt and view your entire history/data. Furthermore, there are options at the bottom of the screen to the three other screens; the scanning page, the analytics page and the gift page.</p><p><strong>The Scanning Page</strong></p><p>This page allows the user to scan a receipt or upload one from their camera roll. The receipt is then analysed by our computer vision procedure and is then classified using our classification method explained above. Once the receipt has been successfully scanned, the user is immediately taken to the analytics so they can see how their recent shop has affected their overall trend.</p><p><strong>The Analytics Page</strong></p><p>This page allows the user to manipulate how they view their history and data. They can choose a timeframe of how long back they want to go back to see their trends as well as choose the type of representation they want for their data (bar chart, pie chart etc). Furthermore, the page has a menu of the previous month’s trends by category, indicating whether the user has spent more or less money on a certain category than in the month before.</p><p><strong>The Gift Page</strong></p><p>Finally, the gift page was an idea the team thought of to further incentivise users to download the app. This is a sort of payback scheme we will negotiate with stores to Loohave their punchcard available on the app. Every time you scan a receipt from a given store, the computer vision will pick up the name and add a stamp to your punchcard for that store. When the user completes the punchcard, they will get a coupon or discount on a certain product that they regularly buy from that store. This will result in two effects; it will spur people to download the app even more as there is now a dual purpose of tracking your spending trends as well as getting discounts from shops and it will be beneficial for stores as shoppers will more likely come back to fill up their punchcards.</p><p>This is a quick summary and guide to the app. There is a short video tutorial and run-through of the app attached below which gives a visual presentation of what using it would look like!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FfqOIDSzm51A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DfqOIDSzm51A&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d1a08fd746d97a36bba82af747445fd/href">https://medium.com/media/5d1a08fd746d97a36bba82af747445fd/href</a></iframe><h3>Conclusion</h3><p>This project was a steep learning experience for everyone in the team. On top of the countless times we pivoted our focus and redirected our effort, we also learned to adapt to new challenges and quickly think of new solutions to fit our project within the timeframe. Moreover, we had to quickly understand each member of the team’s strengths and weaknesses after having not known anyone previously. This was important for proper delegation of tasks and so that we could maximise efficiency. This was a real taster on how to build a project from scratch and the myriad of uncertainties and variables a team will have to consider. We are extremely thankful to Warwick AI Society for giving us the opportunity to work on such a creative idea and for selecting us to be a part of this team. We cannot wait to work on future projects with WAI!</p><p>Please find the GitHub link of this project here :</p><p>Ressources: <a href="https://github.com/WarwickAI/ShoppingTicky">https://github.com/WarwickAI/ShoppingTicky</a></p><ol><li><a href="https://nanonets.com/blog/fuzzy-matching-fuzzy-logic/#:~:text=Fuzzy%20Matching%20(also%20called%20Approximate,are%20not%20exactly%20the%20same.">https://nanonets.com/blog/fuzzy-matching-fuzzy-logic/#:~:text=Fuzzy%20Matching%20(also%20called%20Approximate,are%20not%20exactly%20the%20same.</a></li><li><a href="https://en.wikipedia.org/wiki/Approximate_string_matching">https://en.wikipedia.org/wiki/Approximate_string_matching</a></li><li><a href="https://dzone.com/articles/introduction-to-word-vectors">https://dzone.com/articles/introduction-to-word-vectors</a></li><li><a href="http://asprise.com/receipt-ocr-data-capture-api/extract-text-reader-scanner-index.html">http://asprise.com/receipt-ocr-data-capture-api/extract-text-reader-scanner-index.html</a></li><li><a href="https://monkeylearn.com/text-classification/">https://monkeylearn.com/text-classification/</a></li><li><a href="https://arxiv.org/pdf/1607.01759.pdf">https://arxiv.org/pdf/1607.01759.pdf</a></li><li><a href="https://fasttext.cc/docs/en/supervised-tutorial.html">https://fasttext.cc/docs/en/supervised-tutorial.html</a></li><li><a href="https://fasttext.cc/docs/en/unsupervised-tutorial.html">https://fasttext.cc/docs/en/unsupervised-tutorial.html</a></li><li><a href="https://fasttext.cc/docs/en/unsupervised-tutorial.html">https://fasttext.cc/docs/en/unsupervised-tutorial.html</a></li><li><a href="https://github.com/maxbachmann/RapidFuzz">https://github.com/maxbachmann/RapidFuzz</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2376d87ef8a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/fuzzy-matching-word-vectors-and-google-ml-kit-lessons-learned-d2376d87ef8a">Fuzzy Matching, Word Vectors and Google ML Kit: Lessons Learned in Text Analysis and Classification</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WAI261 Tutorial 0 — Setting up VSCode, Git and NodeJS]]></title>
            <link>https://medium.com/warwick-artificial-intelligence/wai261-tutorial-0-setting-up-vscode-git-and-nodejs-71ed3e0ef3d3?source=rss----e86a4c6c0ca1---4</link>
            <guid isPermaLink="false">https://medium.com/p/71ed3e0ef3d3</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Edward Upton]]></dc:creator>
            <pubDate>Wed, 26 Jan 2022 13:55:37 GMT</pubDate>
            <atom:updated>2022-10-26T18:23:49.451Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*CoSNzRG_FsP7l-HeKf1bLw.jpeg" /></figure><h3>WAI161 Tutorial 0 — Setting up VSCode, Git and NodeJS</h3><p>Hello everyone and welcome to the first tutorial for Warwick AI’s Software Engineering course, where you will be working on creating a working web application with a server.</p><p>This tutorial will cover installing and setting up the required technologies, getting your coding environment ready for development. We will cover:</p><ul><li>Installing <strong>Visual Studio Code</strong> (aka <strong>VSCode</strong>), essentially a text editor for developers, where you will be writing and running all your code</li><li><strong>Git</strong>, a version control software</li><li><strong>NodeJS</strong>, a <strong>JavaScript </strong>runtime essentially allowing you to create and run <strong>JavaScript </strong>(or <strong>TypeScript</strong>) servers and projects.</li></ul><h3>Visual Studio Code</h3><p>Firstly, let’s go ahead and install <strong>VSCode</strong>. Download the setup file from <a href="https://code.visualstudio.com/">here</a>, and follow the install instructions.</p><p>I highly suggest then looking at some guides for using this software, for example, <a href="https://code.visualstudio.com/docs/introvideos/basics">this one</a>.</p><p>Some optional additions to this setup that I advise are:</p><ul><li>Ensure VSCode has <strong>Auto-Save </strong>enabled by clicking <strong>File </strong>and toggling it on.</li><li>Within VSCode add the <strong>ESLint </strong>extension (for showing more errors within VSCode before running).</li><li>Within VSCode add the <strong>Prettier </strong>extension (for auto-formatting your code).</li></ul><p>If you are unsure how to install <strong>VSCode</strong> extensions, there’s a guide <a href="https://code.visualstudio.com/docs/editor/extension-marketplace">here</a>.</p><h3>Git</h3><p><strong>Git</strong> is widely used for managing code-base changes both within personal and team projects. If you are unfamiliar with it, check out <a href="https://www.youtube.com/watch?v=hwP7WQkmECE">this video</a>. To install follow the guide <a href="https://git-scm.com/book/en/v2/Getting-Started-Installing-Git">here</a>.</p><p>To make sure you have properly installed <strong>Git</strong>, open up either <strong>Command Prompt </strong>(on Windows) or a <strong>Terminal </strong>(on MacOS/Linux) and run:</p><pre>git --version</pre><p>This should output something similar to:</p><pre>git version 2.30.0</pre><p>A nice bonus with using <strong>VSCode</strong> is that it has <strong>Git</strong> integration built-in making it a lot easier and quicker to commit changes, push updates to somewhere like <strong>GitHub</strong>, and so on…</p><p>Go ahead and make an account on <strong>GitHub</strong>, where we will <em>push</em> (upload) our changes so that they can be accessed from any device and make it easier for others to see your code.</p><h3>NodeJS</h3><p>As mentioned earlier, <strong>NodeJS</strong> will be used to set up the frontend and backend projects as well as run them. Download the <strong>installer</strong> from <a href="https://nodejs.org/en/download/">here</a> and follow the instructions, stick to the <strong>LTS</strong> version since this is what will be used during the sessions.</p><p><strong>NodeJS</strong> also comes with a utility program called <strong>NPM</strong> (Node Package Manager). NPM helps us install and manage any external packages we use such as <strong>React</strong> (the frontend library we will be using).</p><p>To make sure you have properly installed <strong>Git</strong>, open up either <strong>Command Prompt </strong>(on Windows) or a <strong>Terminal </strong>(on macOS/Linux) and run:</p><pre>node --version </pre><p>You should see something like this shown:</p><pre>v16.13.0 </pre><p>If so you have successfully installed <strong>NodeJS</strong>.</p><p>You are now ready to start development. WAI161 Tutorial 1 will cover setting up a <strong>React</strong> project and starting to create a user interface for the web app, see you then.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71ed3e0ef3d3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/warwick-artificial-intelligence/wai261-tutorial-0-setting-up-vscode-git-and-nodejs-71ed3e0ef3d3">WAI261 Tutorial 0 — Setting up VSCode, Git and NodeJS</a> was originally published in <a href="https://medium.com/warwick-artificial-intelligence">Warwick Artificial Intelligence</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>