hig.sePublications
Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard-cite-them-right
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • sv-SE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • de-DE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Urban vägplanering via Q-Learning
University of Gävle, Faculty of Engineering and Sustainable Development, Department of Computer and Geospatial Sciences, Computer Science.
2024 (Swedish)Independent thesis Basic level (professional degree), 10 credits / 15 HE creditsStudent thesis
Abstract [en]

This study investigated the use of Q-Learning to simulate pedestrian movement patterns in a digital representation of the outdoor environment around the University of Gävle. The domain consisted of a two-dimensional grid with dimensions of 99x99 and included seven different types of terrain as well as 16 destinations. Each type of terrain had an accessibility value within the range 𝛽 = [0, 255 ], where higher values were more attractive for the agent to choose. The domain integrated actual observed footprints, from which four different buffer zones with varying widths were created. These buffer zones were used to assess how well the simulated movement patterns matched reality.

The study examined three different types of terrain models (linear, quadratic, quartic), where each model had a unique set of accessibility values for the terrain types, collected from Ma [1]. To use these positive values as rewards for Q-Learning, the negative inverse was taken, which enabled the agent to find the shortest path between the start and end destinations while maintaining the prioritization order of the accessibility values.

The agent's task was to navigate between the 16 destinations to find 100 converged routes for the three different terrain models. When the agent had found a converged route, this route was updated with a reward increment value within the range ∅ =[0, 30]. This simulated footprints for the next time the agent ran the simulation, which influenced future route choices. Generally, for all terrain models, the converged routes became more concentrated as the reward increment value increased, as these routes accumulated a large reward. When the reward increment value was low, the routes were more dispersed. Since Q-Learning uses an exploration/exploitation policy to determine whether to exploit collected information or continue exploring the environment, a deviation was created in the converged routes. A deviation test showed that the largest deviation in the generated routeswas 10, which was closest to the width of the fourth buffer zone. Therefore, this buffer zone was used to determine how well the generated routes matched reality. To measure this, the number of grid cells for the converged routes within the zone was counted. Pearson's correlation coefficient was used to determine if there was a linear relationship between the number of hits within the zone and the reward increment value ∅. Tests were conducted to identify the best Q-Learning parameters (learning parameter α and discount factor γ) for this domain. The best candidates were 𝛼 = 0.9 and 𝛼 = 1 with 𝛾 = 1. The results showed that the quadratic terrain model performed most effectively with a Pearson's correlation coefficient of 𝑟 = 0.867, while the quartic terrain model with 𝛼 = 0.9, 𝛾 = 1 performed worse with a Pearson's correlation coefficient of 𝑟 = 0.4691.

Abstract [sv]

Denna studie undersökte användningen av Q-Learning för att simulera fotgängares rörelsemönster i en digital representation av utomhusmiljön runt Högskolan i Gävle. Simuleringsområdet bestod av ett tvådimensionellt rutnät med dimensionerna 99x99 och inkluderade sju olika typer av marktyper samt 16 destinationer. Varje marktyp hade ett tillgänglighetsvärde inom intervallet 𝛽 = [0, 255 ], där högre värden var mer attraktiva för aktören att välja. Området integrerade verkliga observerade fotavtryck, utifrån vilka fyra olika buffertzoner med varierande bredd skapades. Dessa buffertzoner användes för att avgöra hur väl de simulerade rörelsemönstren överensstämde med verkligheten.

Studien undersökte tre olika typer av markmodeller (linjär, kvadratisk, kvarts), där varje modell hade en unik uppsättning tillgänglighetsvärden för marktyperna, insamlade från Ma [1]. För att använda dessa positiva värden som belöningar för QLearning togs den negativa inversen, vilket möjliggjorde för aktören att hitta den kortaste vägen mellan start- och slutdestination samtidigt som prioriteringsordningen för tillgänglighetsvärdena bibehölls.

Aktörens uppgift var att navigera mellan de 16 destinationerna för att hitta 100 konvergerade rutter för de tre olika markmodellerna. När aktören hade hittat en konvergerad rutt uppdaterades denna rutt med ett belöningsökningsvärde inom intervallet ∅ = [0, 30]. Detta simulerade fotavtryck för nästa gång aktören körde simuleringen, vilket påverkade framtida ruttval. Generellt för alla markmodeller blev de konvergerade rutterna mer koncentrerade när belöningsökningsvärdet steg, eftersom dessa rutter ackumulerade en stor belöning. När belöningsökningsvärdet var lågt blev rutterna mer utspridda.

Eftersom Q-Learning använder en utforskning/exploatering-policy för att avgöra om den ska utnyttja insamlad information eller fortsätta utforska området, skapades en avvikelse på de konvergerade rutterna. Ett avvikelsetest visade att den största avvikelsen på de genererade rutterna var 10, vilket låg närmast breddstorleken på den fjärde buffertzonen. Därför användes denna buffertzon för att avgöra hur de genererade rutterna stämde överens med verkligheten. För att mäta detta räknades antalet rutor för de konvergerade rutterna inom zonen. Pearsons korrelationskoefficient användes för att avgöra om det fanns ett linjärt samband mellan antal träffar inom zonen och belöningsökningsvärdet ∅. Tester utfördes för att identifiera de bästa Q-Learning-parametrarna (inlärningsparameter α och rabattfaktor γ) för detta område. De bästa kandidaterna visade sig vara 𝛼 = 0.9 och 𝛼 = 1 med 𝛾 = 1. Resultatet visade att den kvadratiska markmodellen presterade mest effektivt med en Pearsonskorrelationskoefficient på 𝑟 = 0.867 , medan kvartsmarkmodellen med 𝛼 = 1 och 𝛾 = 1 presterade sämre med en Pearsons korrelationskoefficient på 𝑟 = 0.4691.

Place, publisher, year, edition, pages
2024. , p. 54
National Category
Computer Sciences
Identifiers
URN: urn:nbn:se:hig:diva-45353OAI: oai:DiVA.org:hig-45353DiVA, id: diva2:1890345
Subject / course
Computer science
Educational program
Högskoleingenjör
Supervisors
Examiners
Available from: 2024-08-22 Created: 2024-08-19 Last updated: 2025-10-02Bibliographically approved

Open Access in DiVA

Urban vägplanering via Q-Learning(4859 kB)43 downloads
File information
File name FULLTEXT01.pdfFile size 4859 kBChecksum SHA-512
ae4cc53b04bec763b13206811cf83aa755e16335cfbf0d66c9b7738af7dcd48acd3ac85157e657063f050cb99c476523f0be4613a9a34cc7721f188e8de1f3eb
Type fulltextMimetype application/pdf

By organisation
Computer Science
Computer Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 44 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 479 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • harvard-cite-them-right
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • sv-SE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • de-DE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf