[{"content":"HighwayENV安装路径 1.创建环境 打开Anaconda Prompt\nconda create -n highwayEnv python==3.7 conda activate highwayEnv pip install matplotlib==3.5 pip install --upgrade pygame pip install pygame==2.1.2 pip install --upgrade pygame 2.选择python解释器 测试代码：\nimport gymnasium import highway_env from matplotlib import pyplot as plt env = gymnasium.make(\u0026#39;highway-v0\u0026#39;, render_mode=\u0026#39;rgb_array\u0026#39;) env.reset() for _ in range(5): action = env.unwrapped.action_type.actions_indexes[\u0026#34;IDLE\u0026#34;] obs, reward, done, truncated, info = env.step(action) env.render() plt.imshow(env.render()) plt.show() 3.pycharm配置 对在工具窗口中显示绘图进行取消\n","permalink":"https://amine123max.github.io/posts/%E6%88%91%E7%9A%84/highwayenv%E5%AE%89%E8%A3%85%E8%B7%AF%E5%BE%84/","summary":"The Way to install HighwayENV","title":"HighwayENV安装路径"},{"content":"如何使用deepseek联合anaconda帮Pycharm快速装配环境 以下以deepseek生成的随机迷宫生成与求解为例子 下面是一个使用Pygame创建随机迷宫生成和可视化求解的程序。这个程序会生成随机迷宫，然后用深度优先搜索算法找到从起点到终点的路径。\nimport pygame import random import time import sys # 初始化pygame pygame.init() # 常量定义 WIDTH, HEIGHT = 800, 600 CELL_SIZE = 20 ROWS, COLS = HEIGHT // CELL_SIZE, WIDTH // CELL_SIZE FPS = 60 # 颜色定义 BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) GREEN = (0, 255, 0) BLUE = (0, 0, 255) PURPLE = (128, 0, 128) # 创建屏幕 screen = pygame.display.set_mode((WIDTH, HEIGHT)) pygame.display.set_caption(\u0026#34;随机迷宫生成与求解\u0026#34;) clock = pygame.time.Clock() class Cell: def __init__(self, row, col): self.row = row self.col = col self.walls = {\u0026#39;top\u0026#39;: True, \u0026#39;right\u0026#39;: True, \u0026#39;bottom\u0026#39;: True, \u0026#39;left\u0026#39;: True} self.visited = False def draw(self): x = self.col * CELL_SIZE y = self.row * CELL_SIZE if self.visited: pygame.draw.rect(screen, WHITE, (x, y, CELL_SIZE, CELL_SIZE)) if self.walls[\u0026#39;top\u0026#39;]: pygame.draw.line(screen, BLACK, (x, y), (x + CELL_SIZE, y), 2) if self.walls[\u0026#39;right\u0026#39;]: pygame.draw.line(screen, BLACK, (x + CELL_SIZE, y), (x + CELL_SIZE, y + CELL_SIZE), 2) if self.walls[\u0026#39;bottom\u0026#39;]: pygame.draw.line(screen, BLACK, (x, y + CELL_SIZE), (x + CELL_SIZE, y + CELL_SIZE), 2) if self.walls[\u0026#39;left\u0026#39;]: pygame.draw.line(screen, BLACK, (x, y), (x, y + CELL_SIZE), 2) def get_neighbors(self, grid): neighbors = [] # 上 if self.row \u0026gt; 0 and not grid[self.row - 1][self.col].visited: neighbors.append(grid[self.row - 1][self.col]) # 右 if self.col \u0026lt; COLS - 1 and not grid[self.row][self.col + 1].visited: neighbors.append(grid[self.row][self.col + 1]) # 下 if self.row \u0026lt; ROWS - 1 and not grid[self.row + 1][self.col].visited: neighbors.append(grid[self.row + 1][self.col]) # 左 if self.col \u0026gt; 0 and not grid[self.row][self.col - 1].visited: neighbors.append(grid[self.row][self.col - 1]) return neighbors def remove_walls(current, next_cell): # 移除当前单元格和下一个单元格之间的墙 dx = current.col - next_cell.col dy = current.row - next_cell.row if dx == 1: # 下一个在左边 current.walls[\u0026#39;left\u0026#39;] = False next_cell.walls[\u0026#39;right\u0026#39;] = False elif dx == -1: # 下一个在右边 current.walls[\u0026#39;right\u0026#39;] = False next_cell.walls[\u0026#39;left\u0026#39;] = False elif dy == 1: # 下一个在上边 current.walls[\u0026#39;top\u0026#39;] = False next_cell.walls[\u0026#39;bottom\u0026#39;] = False elif dy == -1: # 下一个在下边 current.walls[\u0026#39;bottom\u0026#39;] = False next_cell.walls[\u0026#39;top\u0026#39;] = False def generate_maze(): # 创建网格 grid = [[Cell(row, col) for col in range(COLS)] for row in range(ROWS)] # 从随机单元格开始 current = grid[random.randint(0, ROWS-1)][random.randint(0, COLS-1)] current.visited = True stack = [current] # 生成迷宫 while stack: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() screen.fill(WHITE) # 绘制所有单元格 for row in grid: for cell in row: cell.draw() # 绘制当前单元格 pygame.draw.rect(screen, RED, (current.col * CELL_SIZE, current.row * CELL_SIZE, CELL_SIZE, CELL_SIZE)) pygame.display.flip() clock.tick(FPS) # 获取未访问的邻居 neighbors = current.get_neighbors(grid) if neighbors: # 随机选择一个邻居 next_cell = random.choice(neighbors) next_cell.visited = True # 移除墙壁 remove_walls(current, next_cell) # 将当前单元格推入堆栈 stack.append(current) # 将下一个单元格设为当前单元格 current = next_cell elif stack: # 回溯 current = stack.pop() return grid def solve_maze(grid): # 使用深度优先搜索解决迷宫 start = grid[0][0] end = grid[ROWS-1][COLS-1] stack = [start] visited = set() visited.add((start.row, start.col)) path = [] while stack: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() current = stack[-1] # 如果到达终点 if current == end: break # 查找可移动的邻居 neighbors = [] # 上 if current.row \u0026gt; 0 and not current.walls[\u0026#39;top\u0026#39;]: neighbor = grid[current.row - 1][current.col] if (neighbor.row, neighbor.col) not in visited: neighbors.append(neighbor) # 右 if current.col \u0026lt; COLS - 1 and not current.walls[\u0026#39;right\u0026#39;]: neighbor = grid[current.row][current.col + 1] if (neighbor.row, neighbor.col) not in visited: neighbors.append(neighbor) # 下 if current.row \u0026lt; ROWS - 1 and not current.walls[\u0026#39;bottom\u0026#39;]: neighbor = grid[current.row + 1][current.col] if (neighbor.row, neighbor.col) not in visited: neighbors.append(neighbor) # 左 if current.col \u0026gt; 0 and not current.walls[\u0026#39;left\u0026#39;]: neighbor = grid[current.row][current.col - 1] if (neighbor.row, neighbor.col) not in visited: neighbors.append(neighbor) if neighbors: # 选择第一个邻居 next_cell = neighbors[0] visited.add((next_cell.row, next_cell.col)) stack.append(next_cell) # 绘制路径 screen.fill(WHITE) for row in grid: for cell in row: cell.draw() # 绘制路径 for i, cell in enumerate(stack): color = (0, int(255 * i / len(stack)), 255) pygame.draw.rect(screen, color, (cell.col * CELL_SIZE, cell.row * CELL_SIZE, CELL_SIZE, CELL_SIZE)) pygame.display.flip() clock.tick(10) # 减慢求解速度以便观察 else: # 回溯 stack.pop() return stack def main(): # 生成迷宫 grid = generate_maze() # 等待用户按键开始求解 waiting = True while waiting: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_SPACE: waiting = False # 解决迷宫 path = solve_maze(grid) # 显示最终路径 screen.fill(WHITE) for row in grid: for cell in row: cell.draw() for cell in path: pygame.draw.rect(screen, GREEN, (cell.col * CELL_SIZE, cell.row * CELL_SIZE, CELL_SIZE, CELL_SIZE)) # 标记起点和终点 pygame.draw.rect(screen, BLUE, (0, 0, CELL_SIZE, CELL_SIZE)) pygame.draw.rect(screen, PURPLE, ((COLS-1) * CELL_SIZE, (ROWS-1) * CELL_SIZE, CELL_SIZE, CELL_SIZE)) pygame.display.flip() # 等待用户关闭窗口 running = True while running: for event in pygame.event.get(): if event.type == pygame.QUIT: running = False pygame.quit() if __name__ == \u0026#34;__main__\u0026#34;: main() 1.利用deepseek为上述代码生成对应的requirements.txt文件 为上述代码生成 requirements.txt 文件，内容如下： pygame==2.5.2 讲上如内容保存至requirements.txt文件中，如下所示：\n2.利用anaconda配置对应环境 1.打开Anaconda创建对应的环境名称 （注：此处原有微信图片，请手动添加 Anaconda 创建环境的截图）\n2.环境名称安装完成后对环境进行配置 点击Open Terminal\n回退到你所保存requirements.txt文件所在的文件夹，如图所示，该文件所在地址为：C:\\Users\\Amine\\Desktop\\test_py\n在terminal中输入cd C:\\Users\\Amine\\Desktop\\test_py\n再次输入pip install -r requirements.txt就开始配置环境啦\n3.在pycharm中寻找对应的环境配置器 1.点击files-settings-projects-pycharm解释器 2.点击添加解释器-添加本地解释器-现有-\u0026hellip;(框框后的省略号)，再去查找你所配置的环境的位置即可 ","permalink":"https://amine123max.github.io/posts/%E6%88%91%E7%9A%84/%E5%A6%82%E4%BD%95%E4%BD%BF%E7%94%A8deepseek%E8%81%94%E5%90%88anaconda%E5%B8%AEpycharm%E5%BF%AB%E9%80%9F%E8%A3%85%E9%85%8D%E7%8E%AF%E5%A2%83/","summary":"The Way to install HighwayENV","title":"如何使用deepseek联合anaconda帮Pycharm快速装配环境"},{"content":"Intro We\u0026rsquo;ll be using yml/yaml format for all examples down below, I recommend using yml over toml as it is easier to read.\nYou can find any YML to TOML converters if necessary.\nAssets (js/css) The following is enabled by default\nminification - makes the assets size smallest as possible. bundling - bundles all the styles in one single asset fingerprint/intergity check. Default Theme light/dark/auto 1 2 3 4 params: # defaultTheme: light # defaultTheme: dark defaultTheme: auto # to switch between dark or light according to browser theme Theme Switch Toggle (enabled by default) Shows icon besides title of page to change theme\nTo disable it :\n1 disableThemeToggle: true You can refer following table for better understanding\u0026hellip;\ndefaultTheme disableThemeToggle checks local storage? checks system theme? Info auto true No Yes only system theme false Yes (if not-\u0026gt;2) Yes (2) switch present dark true No No force dark only false Yes No switch present light true No No force light only false Yes No switch present Archives Layout Create a page with archive.md in content directory with following content\n. ├── config.yml ├── content/ │ ├── archives.md \u0026lt;--- Create archive.md here │ └── posts/ ├── static/ └── themes/ └── PaperMod/ and add the following to it\n--- title: \u0026#34;Archive\u0026#34; layout: \u0026#34;archives\u0026#34; url: \u0026#34;/archives/\u0026#34; summary: archives --- Note: Archives Layout does not support Multilingual Month Translations.\nex: archives.md\nRegular Mode (default-mode) Home-Info Mode Use 1st entry as some Information\nadd following to config file\nparams: homeInfoParams: Title: Hi there wave Content: Can be Info, links, about... socialIcons: # optional - name: \u0026#34;\u0026lt;platform\u0026gt;\u0026#34; url: \u0026#34;\u0026lt;link\u0026gt;\u0026#34; - name: \u0026#34;\u0026lt;platform 2\u0026gt;\u0026#34; url: \u0026#34;\u0026lt;link2\u0026gt;\u0026#34; Profile Mode Shows Index/Home page as Full Page with Social Links and Image\nadd following to config file\n1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 params: profileMode: enabled: true title: \u0026#34;\u0026lt;Title\u0026gt;\u0026#34; # optional default will be site title subtitle: \u0026#34;This is subtitle\u0026#34; imageUrl: \u0026#34;\u0026lt;image link\u0026gt;\u0026#34; # optional imageTitle: \u0026#34;\u0026lt;title of image as alt\u0026gt;\u0026#34; # optional imageWidth: 120 # custom size imageHeight: 120 # custom size buttons: - name: Archive url: \u0026#34;/archive\u0026#34; - name: Github url: \u0026#34;https://github.com/\u0026#34; socialIcons: # optional - name: \u0026#34;\u0026lt;platform\u0026gt;\u0026#34; url: \u0026#34;\u0026lt;link\u0026gt;\u0026#34; - name: \u0026#34;\u0026lt;platform 2\u0026gt;\u0026#34; url: \u0026#34;\u0026lt;link2\u0026gt;\u0026#34; Search Page PaperMod uses Fuse.js Basic for search functionality\nAdd the following to site config, config.yml\n1 2 3 4 5 outputs: home: - HTML - RSS - JSON # necessary for search Create a page with search.md in content directory with following content\n1 2 3 4 5 6 7 8 --- title: \u0026#34;Search\u0026#34; # in any language you want layout: \u0026#34;search\u0026#34; # necessary for search # url: \u0026#34;/archive\u0026#34; # description: \u0026#34;Description for Search\u0026#34; summary: \u0026#34;search\u0026#34; placeholder: \u0026#34;placeholder text in search input box\u0026#34; --- To hide a particular page from being searched, add it in post\u0026rsquo;s frontmatter\n1 searchHidden: true ex: search.md\nSearch Page also has Key bindings:\nArrow keys to move up/down the list Enter key (return) or Right Arrow key to go to the highlighted page Escape key to clear searchbox and results For Multilingual use search.\u0026lt;lang\u0026gt;.md ex. search.es.md.\nNote: Search will work only on current language, user is currently on !\nCustomizing Fusejs Options\nRefer https://fusejs.io/api/options.html for Options, Add those as shown below.\n1 2 3 4 5 6 7 8 9 10 params: fuseOpts: isCaseSensitive: false shouldSort: true location: 0 distance: 1000 threshold: 0.4 minMatchCharLength: 0 # limit: 10 # refer: https://www.fusejs.io/api/methods.html#search keys: [\u0026#34;title\u0026#34;, \u0026#34;permalink\u0026#34;, \u0026#34;summary\u0026#34;, \u0026#34;content\u0026#34;] Draft Page indication adds [draft] mark to indicate draft pages.\nPost Cover Image In post\u0026rsquo;s page-variables add :\n1 2 3 4 5 6 7 cover: image: \u0026#34;\u0026lt;image path/url\u0026gt;\u0026#34; # can also paste direct link from external site # ex. https://i.ibb.co/K0HVPBd/paper-mod-profilemode.png alt: \u0026#34;\u0026lt;alt text\u0026gt;\u0026#34; caption: \u0026#34;\u0026lt;text\u0026gt;\u0026#34; relative: false # To use relative path for cover image, used in hugo Page-bundles When you include images in the Page Bundle, multiple sizes of the image will automatically be provided using the HTML5 srcset field.\nTo reduce generation time and size of the site, you can disable this feature using\n1 2 3 params: cover: responsiveImages: false To enable hyperlinks to the full image size on post pages, use\n1 2 3 params: cover: linkFullImages: true Share Buttons on post Displays Share Buttons at Bottom of each post\nto show share buttons add\nparams: ShowShareButtons: true Show post reading time Displays Reading Time (the estimated time, in minutes, it takes to read the content.)\nTo show reading time add\nParams: ShowReadingTime: true Show Table of Contents (Toc) on blog post Displays ToC on blog-pages\nTo show ToC add following to page-variables\nShowToc: true To keep Toc Open by default on a post add following to page-variables:\nTocOpen: true BreadCrumb Navigation Adds BreadCrumb Navigation above Post\u0026rsquo;s Title to show subsections and Navigation to Home\nparams: ShowBreadCrumbs: true Can be diabled for particular page\u0026rsquo;s front-matter\n--- ShowBreadCrumbs: false --- Edit Link for Posts Add a button to suggest changes by using the file path of the post to link to a edit destination.\nFor site config use:\nParams: editPost: URL: \u0026#34;https://github.com/\u0026lt;path_to_repo\u0026gt;/content\u0026#34; Text: \u0026#34;Suggest Changes\u0026#34; # edit text appendFilePath: true # to append file path to Edit link Can be modified for individual pages\n--- editPost: URL: \u0026#34;https://github.com/\u0026lt;path_to_repo\u0026gt;/content\u0026#34; Text: \u0026#34;Suggest Changes\u0026#34; # edit text appendFilePath: true # to append file path to Edit link --- The example above would yield the following link for the post file posts/post-name.md: https://github.com/\u0026lt;path_to_repo\u0026gt;/content/posts/post-name.md\nParameter Required Default Value editPost.URL true - editPost.appendFilePath false false editPost.Text false Edit Since the link generated is a regular HTML anchor tag \u0026lt;a href=...\u0026gt;, you can also use other URL schemas like mailto://, e.g. URL: \u0026quot;mailto://mail@example.com?subject=Suggesting changes for \u0026quot;\nOther Posts suggestion below a post Adds a Previous / Next post suggestion under a single post\nparams: ShowPostNavLinks: true Code Copy Button Adds a copy button in code block to copy the code it contains\nparams: ShowCodeCopyButtons: true Multiple Authors To Use multiple authors for a post, in post-variables:\n--- author: [\u0026#34;Me\u0026#34;, \u0026#34;You\u0026#34;] --- To use Multiple Authors Site-wide, in config.yml:\nparams: author: [\u0026#34;Me\u0026#34;, \u0026#34;You\u0026#34;] Comments to add comments, create a html file\nlayouts/partials/comments.html\nand paste code provided by your comments provider\nalso in config add this\nparams: comments: true read more about this hugo-comments\nAccessKeys c - ToC Open/Close g - Go To Top h - Home (according to current lang) t - Theme toggle / - Jumps to search page if in menu What\u0026rsquo;s AccessKeys ?\nEnhanced SEO Enabled only when env: production\nRich Results/Snippets Support Twitter Cards Support The Twitter Cards metadata, except twitter:image should not require additional configuration, since it is generated from metadata that you should already have (for instance the page title and description). The twitter:image uses the Post Cover Image, if present. In the absence of a cover images, the first image from the images frontmatter (a list) is used. images: - image_01.png - image_02.png Finally, if neither of those are provided, twitter:image comes from the first Page Bundle image with feature in the name, with a fallback to the first image with cover or thumbnail in the name. OpenGraph support The OpenGraph metadata, except og:image should not require additional configuration, since it is generated from metadata that you should already have (for instance the page title and description). The og:image uses the Post Cover Image, if present. In the absence of a cover images, the first image from the images frontmatter (a list) is used. images: - image_01.png - image_02.png Finally, if neither of those are provided, og:image comes from the first Page Bundle image with feature in the name, with a fallback to the first image with cover or thumbnail in the name. For pages, you can also add audio (using frontmatter audio: filename.ext) and/or videos. videos: - filename01.mov - filename02.avi Multilingual Support Misc Scroll-Bar themed (by default) Smooth Scroll between in-page links (by default) Scroll-to-Top Button (by default) Displays a Scroll-to-Top button in right-bottom corner Google Analytics integration Syntax highlighting RSS feeds ","permalink":"https://amine123max.github.io/posts/%E6%88%91%E7%9A%84/papermod-features/","summary":"Learn About All Features in C++","title":"C++学习路径（范例）"},{"content":"Intro We\u0026rsquo;ll be using yml/yaml format for all examples down below, I recommend using yml over toml as it is easier to read.\nYou can find any YML to TOML converters if necessary.\nAssets (js/css) ","permalink":"https://amine123max.github.io/posts/%E4%B8%AA%E4%BA%BA%E7%BB%8F%E5%8E%86/%E4%B8%AA%E4%BA%BA%E7%BB%8F%E5%8E%86/","summary":"Learn More About Me","title":"Personal Experience"},{"content":"My Experience Campus activities and internship experience during my undergraduate studies.\n","permalink":"https://amine123max.github.io/experience/","summary":"My Experience","title":"Experience"},{"content":"","permalink":"https://amine123max.github.io/tools/onestep/","summary":"","title":"OneStepUpdate"},{"content":"","permalink":"https://amine123max.github.io/zh/tools/onestep/","summary":"","title":"OneStepUpdate"},{"content":"","permalink":"https://amine123max.github.io/papers/","summary":"","title":"Papers"},{"content":"Projects Explore my research and development projects in autonomous driving, robotics, and machine learning.\n","permalink":"https://amine123max.github.io/projects/","summary":"Projects","title":"Projects"},{"content":"","permalink":"https://amine123max.github.io/tools/resume-builder/","summary":"","title":"Resume Builder"},{"content":"","permalink":"https://amine123max.github.io/zh/tools/resume-builder/","summary":"","title":"Resume Builder"},{"content":"","permalink":"https://amine123max.github.io/tools/","summary":"","title":"Tools"},{"content":"","permalink":"https://amine123max.github.io/zh/tools/","summary":"","title":"工具"},{"content":"我的经历 本科期间的校园活动和实习经历。\n","permalink":"https://amine123max.github.io/zh/experience/","summary":"我的经历","title":"经历"},{"content":"","permalink":"https://amine123max.github.io/zh/papers/","summary":"","title":"论文"},{"content":"项目展示 探索我在自动驾驶、机器人技术和机器学习领域的研究与开发项目。\n","permalink":"https://amine123max.github.io/zh/projects/","summary":"我的项目","title":"项目展示"}]