

PAX
رتبه : 1856
مهارتها
گزارش عملکرد:
جزییات امتیاز مجری
میانگین امتیاز مجری: 10.00 از ۱۰
( از 2 رای خریدارها )
جزییات امتیاز مجری
میانگین امتیاز مجری: 10.00 از ۱۰
( از 2 رای خریدارها )
مهارتهای برتر
**رزومه برنامهنویسی**
**نام** [PAX]
**سن:** 15 سال
**تخصص:** برنامهنویسی پایتون، هوش مصنوعی و توسعه نرمافزار
### **خلاصه حرفهای**
من یک برنامهنویس جوان و پرانرژی هستم که به زبانهای برنامهنویسی مختلف، به ویژه پایتون، تسلط دارم. در حوزههای هوش مصنوعی، یادگیری ماشین و توسعه نرمافزار فعالیت میکنم و علاقهمند به یادگیری فناوریهای جدید و مشارکت در پروژههای چالشبرانگیز هستم. با وجود سن کم، مهارتهای فنی قوی و انگیزه بالایی برای رشد و پیشرفت دارم.
مهارتهای فنی
هوش مصنوعی و یادگیری ماشین: TensorFlow, Keras,PyTorch, Scikit-learn
توسعه وب: HTML
ابزارهای توسعه: VScode
-سایر مهارتها:تحلیل داده، ساخت باتهای تلگرام و...
### **تجربه کاری**
در حال حاضر به عنوان یک فریلنسر و برنامهنویس مستقل فعالیت میکنم و در پروژههای شخصی و کوچک مشارکت داشتهام. آماده همکاری در پروژههای جدید و یادگیری از تجربیات دیگران هستم.
### **تحصیلات**
در حال حاضر دانشآموز هستم و تحصیلات دانشگاهی ندارم، اما به صورت خودآموز و با شرکت در دورههای آنلاین، مهارتهای برنامهنویسی و هوش مصنوعی را فرا گرفتهام.
علایق و فعالیتهای جانبی
یادگیری فناوریهای جدید و شرکت در مسابقات برنامهنویسی ساخت ابزارهای کوچک و کاربردی برای حل مشکلات روزمره
با وجود سن کم، انگیزه و اشتیاق زیادی برای کار در حوزه برنامهنویسی و هوش مصنوعی دارم. آماده همکاری در پروژههای کوچک و بزرگ هستم و میتوانم به سرعت خود را با نیازهای پروژه تطبیق دهم.
پروژه ی نمونه :
import pygame
import random
from enum import Enum
from collections import namedtuple, deque
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import os
import matplotlib.pyplot as plt
from IPython import display
from pathlib import Path
pygame.init()
def game_over_menu():
pygame.init()
menu_width, menu_height = 400, 300
menu_display = pygame.display.set_mode((menu_width, menu_height))
pygame.display.set_caption("Game Over")
menu_font = pygame.font.SysFont("arial", 24)
clock = pygame.time.Clock()
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GRAY = (50, 50, 50)
game_over_text = menu_font.render("Game Over! Choose an option:", True, WHITE)
restart_text = menu_font.render("1. Restart Game", True, WHITE)
exit_text = menu_font.render("2. Exit to Menu", True, WHITE)
run = True
while run:
menu_display.fill(GRAY)
menu_display.blit(game_over_text, (50, 50))
menu_display.blit(restart_text, (80, 120))
menu_display.blit(exit_text, (80, 160))
pygame.display.flip()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_1:
return "restart"
elif event.key == pygame.K_2:
return "exit"
clock.tick(30)
def start_human_game():
game_running = True
while game_running:
if game_over_condition:
choice = game_over_menu()
if choice == "restart":
start_human_game()
game_running = False
elif choice == "exit":
return
def show_menu():
pygame.init()
screen = pygame.display.set_mode((640, 480))
pygame.display.set_caption("Snake Game - Menu")
font = pygame.font.SysFont(None, 50)
running = True
while running:
screen.fill((30, 30, 30))
title_text = font.render("Snake Game", True, (255, 255, 255))
manual_text = font.render("1. بازی دستی", True, (255, 255, 0))
ai_text = font.render("2. بازی با هوش مصنوعی", True, (0, 255, 0))
screen.blit(title_text, (200, 100))
screen.blit(manual_text, (200, 200))
screen.blit(ai_text, (200, 300))
pygame.display.flip()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_1:
return 'human'
elif event.key == pygame.K_2:
return'ai'
def game_menu():
pygame.init()
menu_width, menu_height = 400, 300
menu_display = pygame.display.set_mode((menu_width, menu_height))
pygame.display.set_caption("Game Menu")
menu_font = pygame.font.SysFont("arial", 24)
clock = pygame.time.Clock()
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
GRAY = (50, 50, 50)
title_text = menu_font.render("Select Game Mode", True, WHITE)
play_text = menu_font.render("1. Play Game (Manual)", True, WHITE)
ai_text = menu_font.render("2. Play Game (AI)", True, WHITE)
exit_text = menu_font.render("3. Exit", True, WHITE)
run = True
while run:
menu_display.fill(GRAY)
menu_display.blit(title_text, (100, 50))
menu_display.blit(play_text, (80, 120))
menu_display.blit(ai_text, (80, 160))
menu_display.blit(exit_text, (80, 200))
pygame.display.flip()
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_1:
return "human"
elif event.key == pygame.K_2:
return "ai"
elif event.key == pygame.K_3:
pygame.quit()
quit()
clock.tick(30)
def start_human_game():
game = SnakeGameAI()
game.reset()
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_UP and game.direction != Direction.DOWN:
game.direction = Direction.UP
elif event.key == pygame.K_DOWN and game.direction != Direction.UP:
game.direction = Direction.DOWN
elif event.key == pygame.K_LEFT and game.direction != Direction.RIGHT:
game.direction = Direction.LEFT
elif event.key == pygame.K_RIGHT and game.direction != Direction.LEFT:
game.direction = Direction.RIGHT
reward, done, score = game.play_step([1, 0, 0])
if done:
print(f"Game Over! Your Score: {score}")
choice = game_over_menu()
if choice == "restart":
start_human_game()
break
elif choice == "exit":
main()
game._update_ui()
game.clock.tick(10)
#ماتریکس
class Direction(Enum):
RIGHT = 1
LEFT = 2
UP = 3
DOWN = 4
Point = namedtuple('Point', 'x, y')
WHITE = (255, 255, 255)
YELLOW = (255, 100, 100)
BLUE1 = (0, 200, 0)
BLUE2 = (0, 225, 0)
BLACK = (30, 30, 30)
BLOCK_SIZE = 20
SPEED = 10000
class SnakeGameAI:
def __init__(self, w=640, h=480):
self.font = pygame.font.SysFont('arial', 25)
self.w = w
self.h = h
self.display = pygame.display.set_mode((self.w, self.h))
pygame.display.set_caption('Snake')
self.clock = pygame.time.Clock()
self.reset()
def reset(self):
self.direction = Direction.RIGHT
self.head = Point(self.w / 2, self.h / 2)
self.snake = [
self.head,
Point(self.head.x - BLOCK_SIZE, self.head.y),
Point(self.head.x - (2 * BLOCK_SIZE), self.head.y),
]
self.score = 0
self.food = None
self._place_food()
self.frame_iteration = 0
def _place_food(self):
x = random.randint(0, (self.w - BLOCK_SIZE) // BLOCK_SIZE) * BLOCK_SIZE
y = random.randint(0, (self.h - BLOCK_SIZE) // BLOCK_SIZE) * BLOCK_SIZE
self.food = Point(x, y)
if self.food in self.snake:
self._place_food()
def play_step(self, action):
self.frame_iteration += 1
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit()
quit()
self._move(action)
self.snake.insert(0, self.head)
reward = 0
game_over = False
if self.is_collision() or self.frame_iteration > 100 * len(self.snake):
game_over = True
reward = -10
return reward, game_over, self.score
if self.head == self.food:
self.score += 1
reward = 10
self._place_food()
else:
self.snake.pop()
self._update_ui()
self.clock.tick(SPEED)
return reward, game_over, self.score
def is_collision(self, pt=None):
if pt is None:
pt = self.head
if pt.x > self.w - BLOCK_SIZE or pt.x < 0 or pt.y > self.h - BLOCK_SIZE or pt.y < 0:
return True
if pt in self.snake[1:]:
return True
return False
def _update_ui(self):
self.display.fill(BLACK)
for pt in self.snake:
pygame.draw.rect(self.display, BLUE1, pygame.Rect(pt.x, pt.y, BLOCK_SIZE, BLOCK_SIZE))
pygame.draw.rect(self.display, BLUE2, pygame.Rect(pt.x + 4, pt.y + 4, 12, 12))
pygame.draw.rect(self.display, YELLOW, pygame.Rect(self.food.x, self.food.y, BLOCK_SIZE, BLOCK_SIZE))
text = self.font.render("Score: " + str(self.score), True, WHITE)
self.display.blit(text, [0, 0])
pygame.display.flip()
def _move(self, action):
clock_wise = [Direction.RIGHT, Direction.DOWN, Direction.LEFT, Direction.UP]
idx = clock_wise.index(self.direction)
if np.array_equal(action, [1, 0, 0]):
new_dir = clock_wise[idx]
elif np.array_equal(action, [0, 1, 0]):
next_idx = (idx + 1) % 4
new_dir = clock_wise[next_idx]
else:
next_idx = (idx - 1) % 4
new_dir = clock_wise[next_idx]
self.direction = new_dir
x = self.head.x
y = self.head.y
if self.direction == Direction.RIGHT:
x += BLOCK_SIZE
elif self.direction == Direction.LEFT:
x -= BLOCK_SIZE
elif self.direction == Direction.DOWN:
y += BLOCK_SIZE
elif self.direction == Direction.UP:
y -= BLOCK_SIZE
self.head = Point(x, y)
class Linear_QNet(nn.Module):
def __init__(self, input_size, hidden_size, output_size):
super().__init__()
self.linear1 = nn.Linear(input_size, hidden_size)
self.linear2 = nn.Linear(hidden_size, output_size)
def forward(self, x):
x = F.relu(self.linear1(x))
x = self.linear2(x)
return x
def save(self, file_name='model.pth'):
model_folder_path = './model'
if not os.path.exists(model_folder_path):
os.makedirs(model_folder_path)
file_name = os.path.join(model_folder_path, file_name)
torch.save(self.state_dict(), file_name)
class QTrainer:
def __init__(self, model, lr, gamma):
self.lr = lr
self.gamma = gamma
self.model = model
self.optimizer = optim.Adam(model.parameters(), lr=self.lr)
self.criterion = nn.MSELoss()
def train_step(self, state, action, reward, next_state, done):
state = torch.tensor(state, dtype=torch.float)
next_state = torch.tensor(next_state, dtype=torch.float)
action = torch.tensor(action, dtype=torch.long)
reward = torch.tensor(reward, dtype=torch.float)
if len(state.shape) == 1:
state = torch.unsqueeze(state, 0)
next_state = torch.unsqueeze(next_state, 0)
action = torch.unsqueeze(action, 0)
reward = torch.unsqueeze(reward, 0)
done = (done, )
pred = self.model(state)
target = pred.clone()
for idx in range(len(done)):
Q_new = reward[idx]
if not done[idx]:
Q_new = reward[idx] + self.gamma * torch.max(self.model(next_state[idx]))
target[idx][torch.argmax(action[idx]).item()] = Q_new
self.optimizer.zero_grad()
loss = self.criterion(target, pred)
loss.backward()
self.optimizer.step()
class Agent:
def __init__(self):
self.n_games = 0
self.epsilon = 0
self.gamma = 0.9
self.memory = deque(maxlen=100_000)
self.model = Linear_QNet(11, 256, 3)
self.trainer = QTrainer(self.model, lr=0.001, gamma=self.gamma)
self.load_model_if_exists()
def load_model_if_exists(self):
desktop_path = str(Path.home() / 'Desktop')
model_dir = os.path.join(desktop_path, 'model')
model_path = os.path.join(model_dir, 'model.pth')
if not os.path.exists(model_dir):
os.makedirs(model_dir)
if os.path.exists(model_path):
self.model.load_state_dict(torch.load(model_path))
self.model.eval()
print("مدل ذخیرهشده بارگذاری شد.")
else:
print("هیچ مدل ذخیرهشدهای پیدا نشد.")
def save_model(self):
desktop_path = str(Path.home() / 'Desktop')
model_dir = os.path.join(desktop_path, 'model')
model_path = os.path.join(model_dir, 'model.pth')
if not os.path.exists(model_dir):
os.makedirs(model_dir)
torch.save(self.model.state_dict(), model_path)
print("مدل بهینهشده ذخیره شد.")
def get_state(self, game):
head = game.snake[0]
point_l = Point(head.x - BLOCK_SIZE, head.y)
point_r = Point(head.x + BLOCK_SIZE, head.y)
point_u = Point(head.x, head.y - BLOCK_SIZE)
point_d = Point(head.x, head.y + BLOCK_SIZE)
dir_l = game.direction == Direction.LEFT
dir_r = game.direction == Direction.RIGHT
dir_u = game.direction == Direction.UP
dir_d = game.direction == Direction.DOWN
state = [
(dir_r and game.is_collision(point_r)) or
(dir_l and game.is_collision(point_l)) or
(dir_u and game.is_collision(point_u)) or
(dir_d and game.is_collision(point_d)),
(dir_u and game.is_collision(point_r)) or
(dir_d and game.is_collision(point_l)) or
(dir_l and game.is_collision(point_u)) or
(dir_r and game.is_collision(point_d)),
(dir_d and game.is_collision(point_r)) or
(dir_u and game.is_collision(point_l)) or
(dir_r and game.is_collision(point_u)) or
(dir_l and game.is_collision(point_d)),
dir_l,
dir_r,
dir_u,
dir_d,
game.food.x < game.head.x,
game.food.x > game.head.x,
game.food.y < game.head.y,
game.food.y > game.head.y,
]
return np.array(state, dtype=int)
def remember(self, state, action, reward, next_state, done):
self.memory.append((state, action, reward, next_state, done))
def train_long_memory(self):
if len(self.memory) > 1000:
mini_sample = random.sample(self.memory, 1000)
else:
mini_sample = self.memory
states, actions, rewards, next_states, dones = zip(*mini_sample)
self.trainer.train_step(states, actions, rewards, next_states, dones)
def train_short_memory(self, state, action, reward, next_state, done):
self.trainer.train_step(state, action, reward, next_state, done)
def get_action(self, state):
self.epsilon = 80 - self.n_games
final_move = [0, 0, 0]
if random.randint(0, 200) < self.epsilon:
move = random.randint(0, 2)
final_move[move] = 1
else:
state0 = torch.tensor(state, dtype=torch.float)
prediction = self.model(state0)
move = torch.argmax(prediction).item()
final_move[move] = 1
return final_move
plt.ion()
def plot(scores, mean_scores):
display.clear_output(wait=True)
display.display(plt.gcf())
plt.clf()
plt.title('Training...')
plt.xlabel('Number of Games')
plt.ylabel('Score')
plt.plot(scores)
plt.plot(mean_scores)
plt.ylim(ymin=0)
plt.text(len(scores)-1, scores[-1], str(scores[-1]))
plt.text(len(mean_scores)-1, mean_scores[-1], str(mean_scores[-1]))
plt.show(block=False)
plt.pause(.1)
def train():
plot_scores = []
plot_mean_scores = []
total_score = 0
record = 0
agent = Agent()
game = SnakeGameAI()
while True:
state_old = agent.get_state(game)
final_move = agent.get_action(state_old)
reward, done, score = game.play_step(final_move)
state_new = agent.get_state(game)
agent.train_short_memory(state_old, final_move, reward, state_new, done)
agent.remember(state_old, final_move, reward, state_new, done)
if done:
game.reset()
agent.n_games += 1
agent.train_long_memory()
if score > record:
record = score
agent.save_model()
print(f'Game {agent.n_games}, Score {score}, Record: {record}')
plot_scores.append(score)
total_score += score
mean_score = total_score / agent.n_games
plot_mean_scores.append(mean_score)
plot(plot_scores, plot_mean_scores)
choice = game_menu()
if choice == 'human':
start_human_game()
elif choice == 'ai':
train()
agent = Agent()
game = SnakeGameAI()
try:
while True:
state_old = agent.get_state(game)
final_move = agent.get_action(state_old)
reward, done, score = game.play_step(final_move)
state_new = agent.get_state(game)
agent.train_short_memory(state_old, final_move, reward, state_new, done)
agent.remember(state_old, final_move, reward, state_new, done)
if done:
game.reset()
agent.n_games += 1
agent.train_long_memory()
print(f'بازی شماره: {agent.n_games}, امتیاز: {score}')
finally:
agent.save_model()
import atexit
def save_on_exit(agent):
"""ذخیره مدل هنگام خروج."""
print("در حال ذخیره مدل قبل از خروج...")
agent.save_model()
def train():
plot_scores = []
plot_mean_scores = []
total_score = 0
record = 0
agent = Agent()
game = SnakeGameAI()
atexit.register(save_on_exit, agent)
while True:
state_old = agent.get_state(game)
final_move = agent.get_action(state_old)
reward, done, score = game.play_step(final_move)
state_new = agent.get_state(game)
agent.train_short_memory(state_old, final_move, reward, state_new, done)
agent.remember(state_old, final_move, reward, state_new, done)
if done:
game.reset()
agent.n_games += 1
agent.train_long_memory()
if score > record:
record = score
print(f'Game {agent.n_games}, Score {score}, Record: {record}')
plot_scores.append(score)
total_score += score
mean_score = total_score / agent.n_games
plot_mean_scores.append(mean_score)
plot(plot_scores, plot_mean_scores)
def main():
choice = game_menu()
if choice == 'human':
start_human_game()
elif choice == 'ai':
train()
if __name__ == '__main__':
main()
فعالیت به عنوان مجری
بدون امتیاز .
750,000 تومان
پروژه لغو شده است.
برای " پروژه اصلاح پروپوزال رشته ایمنی (8597) "
750,000 تومان
یک ماه پیش .
جزییات امتیاز دریافتی مجری
برای " رفع اشکال کدها "
(رای توسط کاربر408276 )
میانگین امتیاز مجری: 10.00 از ۱۰
جزییات امتیاز دریافتی مجری
برای " رفع اشکال کدها "
(رای توسط کاربر408276 )
میانگین امتیاز مجری: 10.00 از ۱۰
برای " رفع اشکال کدها "
50,000 تومان
عالی هستند. همه موارد رو با حوصله توضیح میدند و تعامل بسیار بالایی هم دارند. به امید همکاری های بیشتر.
برای " رفع اشکال کدها "
50,000 تومان
یک ماه پیش .
جزییات امتیاز دریافتی مجری
برای " رفع خطای اجرای فایل exe مدل GUI پایتون "
(رای توسط کاربر408276 )
میانگین امتیاز مجری: 10.00 از ۱۰
جزییات امتیاز دریافتی مجری
برای " رفع خطای اجرای فایل exe مد ... "
(رای توسط کاربر408276 )
میانگین امتیاز مجری: 10.00 از ۱۰
10,000 تومان
بسیار بسیار مسلط هستند. مشکل من رو ظرف چند دقیقه حل کردند. بسیار با تعامل و پاسخگو هم هستند. پایتون. با خیال راحت بسپارید پروژه هاتون رو به ایشون.
برای " رفع خطای اجرای فایل exe مدل GUI پایتون "
10,000 تومان
فعالیت به عنوان خریدار
پروژهها
