...

/

OpenAI o3 أم DeepSeek-R1: أي نموذج استدلالي هو الأفضل؟

OpenAI o3 أم DeepSeek-R1: أي نموذج استدلالي هو الأفضل؟

قم بمقارنة OpenAI o3 و DeepSeek-R1 في مهام التفكير المختلفة مثل الترميز والمنطق وحل المشكلات لتحليل أدائهما.

سنغطي ما يلي...

في الدروس السابقة، قارنّا جوانب مختلفة من نماذج DeepSeek مع منافسين آخرين، بما في ذلك نماذج OpenAI وGemini وLlama وMistral. في هذا الدرس، سنجري تجاربنا الخاصة، ونختبر نموذج R1 من DeepSeek ونموذج o3-mini (عالي الأداء) من OpenAI، وهما حاليًا من بين أفضل النماذج للترميز والاستدلال، كما هو موضح في مقارناتنا في الدروس السابقة.

سنجري تجارب متعددة لتقييم كلا النموذجين في البرمجة، والتفكير المنطقي، وحل المشكلات القائمة على العلوم والتكنولوجيا والهندسة والرياضيات. لكل مهمة، سنُوجّه كلا النموذجين بنفس التوجيه ونُحلل استجاباتهما.

الترميز

لنبدأ بمثال برمجة. نريد إنشاء رسوم متحركة تفاعلية مبنية على الفيزياء باستخدام JavaScript. ستحاكي الرسوم المتحركة مجرة نجوم تتحرك تحت تأثير الجاذبية، مع دمج سلوكيات ديناميكية مثل الدمج، ومزج الألوان، وانفجارات المستعرات العظمى.

يتم تقديم المطالبة أدناه:

اِسْتَدْعَى:

قم بإنشاء رسوم متحركة JavaScript من شأنها محاكاة مجرة من النجوم تتحرك في مجال جاذبية داخل حاوية باستخدام الميزات التالية:

  • نجوم موضوعة بشكل عشوائي بكتل وألوان مختلفة (أبيض، أزرق، أصفر، أخضر، وأحمر)

  • محاكاة الجاذبية: النجوم تجتذب بعضها البعض بناءً على نموذج نيوتن البسيط للجاذبية

  • اندماج النجوم: إذا اقترب نجمان بدرجة كافية، فإنهما يندمجان لتكوين نجم أكبر، ويمتزج لوناهما باستخدام خلط الألوان الإضافي

  • تأثير المستعر الأعظم: عندما يصل النجم إلى حد معين من الكتلة، فإنه ينفجر إلى عدة نجوم أصغر

  • تحديثات فيزيائية سلسة مع حركة جاذبية تبدو واقعية

أولاً، من حيث الوقت، استغرق o3-mini-high حوالي 30 ثانية لتوليد استجابة، بينما استغرق DeepSeek-R1 حوالي 6 دقائق. ظل R1 يفكر ويعيد التفكير في الطلب. قد يُحبط بطء استجابة بعض المستخدمين.

كما يتضح من تشغيل الكود، فإن الكود المُولّد يُنفّذ تقريبًا نفس المطلوب في الموجّه. يُنشئ هذا الكود المُولّد JavaScript محاكاة تفاعلية لمجرة تتحرك فيها النجوم تحت تأثير قوى الجاذبية، وتندمج عند اصطدامها، وتنفجر مُشكّلةً مستعرات عظمى عندما تصبح ضخمة جدًا. كما تُرى النجوم أحيانًا تدور حول بعضها البعض بسبب قوة الجاذبية، وتُغيّر مساراتها عند اقتراب نجمين، ولكن ليس بالقدر الكافي للاندماج.

يتخذ الكود المُولّد بواسطة DeepSeek نهجًا مختلفًا. كما هو مُلاحظ، النجوم أكبر بكثير، ويبدو أنها تتحرك ببطء شديد، وعند اندماجها، يبدو أنها تتقارب لتكوّن لونًا واحدًا.white ويرجع ذلك إلى النهج المختلف الذي اتبعته كلا الكودين.

في الكود المُولّد بواسطة o3-mini-high، عند اندماج نجمتين، يُمزج لونهما باستخدام متوسط الكتلة المرجحة بدلاً من الجمع البسيط. هذا يضمن أن يُمثّل اللون الناتج مزيج الألوان الأصلية بشكل واقعي.

let newColor = {
r: Math.min(255, (starA.color.r * starA.mass + starB.color.r * starB.mass) / totalMass),
g: Math.min(255, (starA.color.g * starA.mass + starB.color.g * starB.mass) / totalMass),
b: Math.min(255, (starA.color.b * starA.mass + starB.color.b * starB.mass) / totalMass)
};
Star color change function when multiple stars merge by o3-mini-high

من ناحية أخرى، يقوم الكود الذي تم إنشاؤه بواسطة DeepSeek بدمج النجوم باستخدام إضافة بسيطة لقيم ألوان RGB:

r: Math.min(255, s1.color.r + s2.color.r),
g: Math.min(255, s1.color.g + s2.color.g),
b: Math.min(255, s1.color.b + s2.color.b)
Star color change function when multiple stars merge by DeepSeek R1

نظرًا لأن قيم RGB تزداد عند الدمج، وMath.min(255, value) تأكد من عدم تجاوزها 255، حيث ستصل معظم النجوم في النهاية إلى (255، 255، 255) → الأبيض بعد عمليات الدمج المتعددة.

كان انفجار "المستعر الأعظم" أحد الجوانب الرئيسية للموجه. وكما يتضح من مخرجات كلا الرمزين، يبدو انفجار المستعر الأعظم في الرمز الناتج عن o3-mini-high أكثر سلاسة، بينما في الرمز الناتج عن نموذج DeepSeek-R1، تبدو النجوم ملتصقة ببعضها في عنقود غريب يتغير لونه باستمرار. ثم تنفجر بشكل عشوائي. لنلقِ نظرة على الرمزين.

يتم إنشاء الكود التالي للمستعر الأعظم بواسطة نموذج o3-mini-high:

...
let fragments = 8; // Number of fragments to create
for (let j = 0; j < fragments; j++) {
let angle = Math.random() * 2 * Math.PI;
let speed = randomInRange(1, 3);
// Each fragment gets a fraction of the parent's mass
let fragmentMass = star.mass / (fragments * 1.5);
newStars.push(new Star(
star.x,
star.y,
star.vx + Math.cos(angle) * speed,
star.vy + Math.sin(angle) * speed,
fragmentMass,
star.color
));
...
Supernova code by o3-mini-high

عندما يتجاوز نجمٌ عتبة المستعر الأعظم، ينقسم إلى ثماني شظايا، وهي نسخٌ أصغر منه. يرث كلُّ شظية لونَ النجم الأصلي، ويكتسب كلُّ شظية سرعةً خارجيةً عشوائيةً لتأثير انفجارٍ أكثر طبيعية.

من ناحية أخرى، في الكود المُولّد بواسطة DeepSeek، عند تجاوز الكتلة، ينقسم النجم إلى أربعة أجزاء، ويُخصّص ألوانًا عشوائية جديدة لكل جزء بدلًا من الاحتفاظ باللون الأصلي. تُوضع الأجزاء قريبة من بعضها البعض (+/- 20 pixels )، لكن سرعتها ليست موجهة بقوة نحو الخارج. ونتيجةً لذلك، لا تنتشر الشظايا بشكل كافٍ نظرًا لصغر سرعتها. وهذا يُسبب تكتلات غريبة الشكل بدلًا من انفجار هائل.

...
return Array.from({length: 4}, () => new Star(
star.x + (Math.random()-0.5)*20, // Small random offset
star.y + (Math.random()-0.5)*20,
star.mass/4, // Even split of mass
colors[Math.floor(Math.random()*4)], // Random color (unnatural effect)
(Math.random()-0.5)*20, // Small random velocity
(Math.random()-0.5)*20
));
...
Supernova code by DeepSeek R1

بناءً على النتائج، يُمكن استنتاج أن الكود المُولّد بواسطة o3-mini-high كان أفضل لأنه استوفى المتطلبات المحددة في موجه الأوامر. على الرغم من محاولة الكود المُولّد بواسطة DeepSeek-R1 استيفاء المتطلبات، إلا أن بعضها لم يُنفّذ بشكل صحيح كما ذُكر سابقًا.

الاستدلال المنطقي

في هذه التجربة، طُرِحَت مُحَاوَلَةٌ بسيطة. المُحَاوَلَةُ عبارةٌ عن لغزٍ منطقيٍّ واستدلاليٍّ يتضمن عناصرَ من التفكير العلائقي. تختبرُ بشكلٍ رئيسيٍّ المنطقَ الاستنتاجيَّ وفهمَ آليةِ الترتيب.

مُلَحِّظ: في مملكة بعيدة، ثلاثة علماء حكماء - زاندر، وإيفيت، وزاكاري - معروفون بذكائهم وحكمتهم. تُشير السجلات الملكية إلى أنه إذا كان زاندر أكبر من إيفيت، وإيفيت أكبر من زاكاري، فإن زاكاري هو الأصغر. ومع ذلك، يُضيف مرسوم جديد أنه إذا وُلِد إيفيت وزاكاري في نفس العام، ولكن ولادة زاكاري كانت في وقت لاحق من ولادة إيفيت، فسيظل يُعتبر أصغر. بما أن الكاتب الملكي سجل ولادة إيفيت قبل زاكاري، وأن زاندر أكبر منهما سنًا، فمن يحمل لقب أصغر العلماء؟

استجاب نموذج o3-mini-high في غضون 5 ثوانٍ. كانت عملية التفكير قصيرة، منظمة، مباشرة، ومنهجية. تتحرك خطوة بخطوة، وتُطبق كل قاعدة مرة واحدة، وتصل إلى نتيجة واضحة دون إعادة النظر في النقاط.

Okay, I'm looking at the puzzle about the kingdom's three scholars: Xander, Yvette, and Zachary.
From what I gather, it says if Xander is older than Yvette, and Yvette is older than Zachary, then Zachary is the
youngest. But there's also this extra rule: If Yvette and Zachary were born in the same year, but Zachary was born
later, Zachary would still count as younger.
Since Yvette's birth is recorded before Zachary’s, and Xander's older than both, I think Zachary holds the title of
the youngest.
Alright, the puzzle involves a decree stating that if Yvette and Zachary were born in the same year, but Zachary was born
later in the year, he'd still be considered younger. Given that the records show Yvette's birth came before
Zachary's, it seems clear: Yvette is older than Zachary. And Xander is older than both of them. So, in the chain:
Xander > Yvette > Zachary. Therefore, Zachary is the youngest scholar according to the royal records.
Thought process of o3-mini-high

يتم إعطاء إخراج الناتج عن o3-mini-high أدناه:

الإخراج بواسطة o3-mini-high:

بالنظر إلى السجلات والمراسيم:

  1. زاندر أكبر سناً من كل من إيفيت وزاكاري.

  2. تشير السجلات إلى أنه إذا كان زاندر أكبر سناً من إيفيت، وإيفيت أكبر سناً من زاكاري، فإن زاكاري هو الأصغر.

  3. حتى لو وُلِدت إيفيت وزاكاري في نفس العام، فإن المرسوم الجديد ينص على أن المولود لاحقًا في نفس العام هو الأصغر. وبما أن الكاتب سجل ميلاد إيفيت قبل ميلاد زاكاري، فيُعتبر زاكاري أصغر في هذه الحالة أيضًا.

ولذلك يحمل زاكاري لقب أصغر عالم.

استجاب نموذج DeepSeek بعد 57 ثانية، مع عملية التفكير التالية:

Okay, let's tackle this problem step by step. So, there are three scholars: Xander, Yvette, and Zachary. The royal records
have some rules about determining who's the youngest. Let me parse through the information given.
First, the original rule says that if Xander is older than Yvette, and Yvette is older than Zachary, then
Zachary is the youngest. That seems straightforward—age hierarchy based purely on birth years. But then there's
a new decree added. This decree states that if Yvette and Zachary were born in the same year, but Zachary
was born later in the year than Yvette, he would still be considered younger. Hmm, so even if they're the same
age in terms of years, the exact birth date matters. If Zachary's birthday is later, he's considered younger,
even in the same birth year.
Now, the royal scribe recorded Yvette’s birth before Zachary’s. So, Yvette was born earlier in the year than
Zachary. Wait, but the new decree says that if they were born in the same year and Zachary's birth is later,
he's considered younger. But here, it's stated that Yvette's birth was recorded before Zachary's. Does that mean
they were born in the same year? Because if they were born in different years, the order of birth within the year
wouldn't matter as much, right? For example, if Yvette was born in 1990 and Zachary in 1991, then Yvette is older
regardless of the month. But if they were both born in 1990, and Yvette was born in January and Zachary in February,
then according to the new decree, even though they're the same age in years, Zachary is younger because his birth is
later in the year.
But the problem states that the scribe recorded Yvette’s birth before Zachary’s. So this could imply that they are in
the same year, with Yvette having an earlier birth date. However, the problem also mentions that Xander is older than both.
So Xander's birth year is earlier than both Yvette and Zachary. Now, the key here is whether Yvette and Zachary are in the
same birth year or not.
If they are in the same birth year, then according to the new decree, since Yvette's birth was recorded before Zachary's
(i.e., born earlier in the year), Zachary would still be considered younger. But wait, the new decree says that if they were
born in the same year and Zachary's birth is later, he's considered younger. But here, Yvette's birth is recorded first, so
she was born earlier in the year. Therefore, in that case, Zachary is younger. But if they were in different years, then
Yvette would be older because her birth year is earlier. Wait, but the problem states that Xander is older than both. So Xander's
birth year is earlier than both Yvette and Zachary. Now, we need to know if Yvette and Zachary are in the same year or not.
The problem says "the royal scribe recorded Yvette’s birth before Zachary’s." If the scribe records births in chronological order,
then this could mean that Yvette was born before Zachary in the same year, or that Yvette was born in an earlier year. But the new
decree specifically talks about the case where they are born in the same year. So maybe the fact that the scribe recorded Yvette's birth
before Zachary's indicates that they are in the same year, with Yvette born earlier. Because if they were in different years, the scribe
would just record the years, not the order within the year. Hmm.
So putting this together: Xander is older than both Yvette and Zachary. Now, Yvette and Zachary's birth order is recorded as Yvette first,
then Zachary. If they are in the same year, then Zachary is younger because his birth was later in the year. If they are in different years,
then Yvette's birth year is earlier than Zachary's, making Yvette older. But the problem doesn't explicitly state their birth years, only the
order in which their births were recorded. The key point is the new decree's condition: if they were born in the same year and Zachary's birth is later,
he's younger. But the scribe recorded Yvette's birth first, which in the context of the same year would mean she's older, making Zachary younger. Therefore,
under the new decree, even if they are in the same year, Zachary is younger.
But wait, the original rule was if Xander > Yvette > Zachary in age, then Zachary is the youngest. But with the new decree, even if Yvette and Zachary are
the same age (same year), the exact birth date matters. So the problem states that the scribe recorded Yvette’s birth before Zachary’s. This could mean
that they are in the same year, so Zachary is younger. Since Xander is older than both, regardless of Yvette and Zachary's relation, Xander is the oldest,
then Yvette, then Zachary. But wait, if Yvette and Zachary are in the same year, and Zachary is younger because his birth is later, then the order is
Xander (oldest), Yvette, Zachary (youngest). If they are in different years, then Yvette's birth being recorded before Zachary's would mean she was born
in an earlier year, so Yvette is older than Zachary. But Xander is older than both, so again the order is Xander, Yvette, Zachary. Therefore, in both scenarios,
Zachary is the youngest. The new decree just clarifies that even if they share the same birth year, the exact date matters. Since the scribe recorded Yvette first,
implying same year with earlier birth, making Zachary the youngest. So regardless of whether they are in the same year or different years, Zachary ends up as the
youngest. Therefore, the answer should be Zachary.
Thought process by DeepSeek-R1

وأخيرًا، توصل نموذج DeepSeek إلى استجابة التالية:

الإخراج بواسطة DeepSeek-R1:

الجواب: زاكاري يحمل لقب أصغر عالم.

توضيح:

  1. يعتبر زاندر أكبر سناً من كل من إيفيت وزاكاري (معطى).

  2. تم تسجيل ولادة إيفيت قبل ولادة زاكاري من قبل الكاتب الملكي.

    1. إذا كان إيفيت وزاكاري قد ولدا في نفس العام، فإن المرسوم الجديد يوضح أن زاكاري، الذي ولد في وقت لاحق من العام، يعتبر أصغر سنا.

    2. إذا كانا قد ولدا في سنوات مختلفة، فإن ميلاد إيفيت المسجل سابقًا يعني أنها أكبر سنًا.

  3. في كلا السيناريوهين، التسلسل الهرمي هو Xander > Yvette > Zachary.

وبذلك يكون زاكاري هو الأصغر بالتأكيد.

أعطى كلا النموذجين الإجابة الصحيحة منطقيًا، وإن كان نموذج DeepSeek يستغرق وقتًا أطول بكثير. ومع ذلك، وكما يتضح، فإن عملية الاستدلال في DeepSeek في المقطع معقدة للغاية، مع تكرار مفرط وتراجع غير ضروري، مما يجعلها غير فعالة ويصعب متابعتها. مع أن النموذج يتوصل بشكل صحيح إلى أن زاكاري هو الأصغر، إلا أنه كان من الممكن هيكلة الحجة بشكل أوضح من خلال تناول الشروط مفتاح مباشرةً دون إعادة تقييم النقاط نفسها مرارًا وتكرارًا. يمكن تلخيص المنطق الأساسي - التمييز بين سنوات الميلاد المختلفة وسيناريو سنة الميلاد نفسها - بشكل كبير، لتجنب الاستدلال الدائري. إن اتباع نهج أكثر إيجازًا وتنظيمًا سيجعل الشرح أكثر فعالية وسهولة في الفهم.

في هذه المهمة تحديدًا، والتي كانت سهلة للغاية، كان أداء نموذج o3 أفضل، إذ استغرق وقتًا قصيرًا جدًا للوصول إلى الإجابة. ومع ذلك، بالنسبة للمشاكل الأكثر تعقيدًا، يُعتبر نموذج DeepSeek أفضل، إذ يُظهر عملية التفكير كاملةً، مُوضحًا جميع خطواتها.

حل مشاكل العلوم والتكنولوجيا والهندسة والرياضيات

بالنسبة لهذه التجربة، سنقدم مشكلة STEM لمعرفة كيفية أداء كل منهما لاختبار مهارات النماذج في العلوم والتكنولوجيا والهندسة والرياضيات.

تم إعطاء مشكلة التكامل التالية لكلا النموذجين:

Prompt: Find the integral of x²sin(x)dxx² sin(x) dx

مرة أخرى، فكّر نموذج o3 لمدة أربع ثوانٍ تقريبًا، وبدأ بتقديم الحل. كانت عملية التفكير في النموذج موجزة، ووصلت مباشرةً إلى النقطة الأساسية:

To integrate𝑥2sin(𝑥)𝑑𝑥∫𝑥^2 sin(𝑥)𝑑𝑥, we can use integration by parts twice.

وقد قدم النموذج بعد ذلك الحل التالي:

حل:

الخطوة 1: التكامل الأول حسب الأجزاء

Let u=x2u = x^2 and dv=sin(x)dx. dv = \sin(x) \, dx. ...